WO2020156035A1 - View processing method and apparatus, and electronic device and computer-readable storage medium, and image processing method and apparatus, and electronic device and computer-readable storage medium - Google Patents

View processing method and apparatus, and electronic device and computer-readable storage medium, and image processing method and apparatus, and electronic device and computer-readable storage medium Download PDF

Info

Publication number
WO2020156035A1
WO2020156035A1 PCT/CN2020/070315 CN2020070315W WO2020156035A1 WO 2020156035 A1 WO2020156035 A1 WO 2020156035A1 CN 2020070315 W CN2020070315 W CN 2020070315W WO 2020156035 A1 WO2020156035 A1 WO 2020156035A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
thread
processing
asynchronous
loaded
Prior art date
Application number
PCT/CN2020/070315
Other languages
French (fr)
Chinese (zh)
Inventor
李应鹏
丁力
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201910099987.XA external-priority patent/CN109788334A/en
Priority claimed from CN201910099986.5A external-priority patent/CN109801210A/en
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2020156035A1 publication Critical patent/WO2020156035A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/235Processing of additional data, e.g. scrambling of additional data or processing content descriptors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB

Definitions

  • the present disclosure relates to the technical field of application software, in particular to a barrage processing method, device, electronic equipment, and computer-readable storage medium, and the present disclosure also relates to an image processing method, device, electronic equipment, and computer-readable storage medium .
  • a bullet screen includes many view levels (sub-views), such as a user’s avatar, multiple pictures, multiple text, background, special effects and other different view levels, even the simplest bullet screen , Also includes 3 view levels: an avatar, a sentence, and a background.
  • the present disclosure provides a barrage processing method, device, electronic equipment, and computer-readable storage medium, so as to realize the timely display of the barrage and avoid the occurrence of the jam phenomenon.
  • a method for processing barrage which is applied to an electronic device with a main thread and an asynchronous thread created on the electronic device, and the method includes:
  • the rendered image is displayed through the display interface.
  • the rasterizing the barrage to be processed by the asynchronous thread to obtain an image includes:
  • the performing rasterization processing on the to-be-processed barrage by the asynchronous thread to obtain an image includes:
  • a preset loop recursive method is selected by the asynchronous thread to rasterize the to-be-processed barrage to obtain an image.
  • the asynchronous thread is stored in a thread pool created on the electronic device
  • the selection of the asynchronous thread includes any one of the following:
  • An idle asynchronous thread is selected in the thread pool according to a preset order.
  • a barrage processing device has a main thread and an asynchronous thread created on the device, and the device includes:
  • the processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread to obtain an image
  • a rendering unit configured to perform rendering processing on the image through the main thread to obtain a rendered image
  • the display unit is configured to display the rendered image through a display interface.
  • the processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
  • the processing unit is configured to select a preset loop recursive method through the asynchronous thread to rasterize the to-be-processed barrage to obtain an image.
  • the asynchronous thread is stored in a thread pool created on the device,
  • the processing unit is used to select any idle asynchronous thread in the thread pool; or, used to select an idle asynchronous thread in the thread pool in a preset order.
  • an electronic device including: a processor and a memory;
  • the memory is used to store operation instructions
  • the processor is configured to execute the above-mentioned barrage processing method by calling the operation instruction.
  • a computer-readable storage medium is provided, the computer storage medium is used to store computer instructions, which when run on a computer, cause the computer to execute the above-mentioned barrage processing method.
  • the barrage to be processed is rasterized by the asynchronous thread to obtain an image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through a display interface The rendered image.
  • the above-mentioned processing provided by the present disclosure realizes the timely display of the bullet screen. Through the division and cooperation of the main thread and the asynchronous thread, the processing efficiency is improved, the stuttering phenomenon in the UI interface is avoided, and the user experience is increased, and Through the introduction of asynchronous threads, the processing speed of the main thread is improved, thereby effectively improving the fluency of the display.
  • the present disclosure also provides an image processing method, device, electronic equipment, and computer-readable storage medium, so as to realize the timely display of graphics and text and avoid the occurrence of jams.
  • an image processing method is provided, which is applied to a business device, where a main thread is created on the business device, and the method includes:
  • the rendered image is displayed through the display interface.
  • the asynchronous thread is stored in a thread pool created on the service device,
  • the selection of asynchronous threads includes any of the following:
  • An asynchronous thread is selected in the thread pool according to a preset sequence.
  • the trigger processing for drawing the image to be loaded includes:
  • the corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
  • the cell corresponding to the image to be loaded is in the display interface
  • the cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  • the performing rendering processing on the drawn image by the main thread to obtain the rendered image includes:
  • the drawn image is rendered by the main thread to obtain the rendered image.
  • an image processing device wherein a main thread is created on the device, and the device includes:
  • the drawing unit is used to draw the image to be loaded based on the selected asynchronous thread to obtain the drawn image
  • a rendering unit configured to perform rendering processing on the drawn image through the main thread to obtain a rendered image
  • the display unit is configured to display the rendered image through a display interface.
  • the asynchronous thread is stored in a thread pool created on the device,
  • the drawing unit is used to select any asynchronous thread in the thread pool; or, to select an asynchronous thread in the thread pool in a preset order.
  • it also includes:
  • a processing unit configured to draw the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
  • the corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
  • the cell corresponding to the image to be loaded is in the display interface
  • the cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  • the rendering unit is configured to perform rendering processing on the drawn image through the main thread when the cell corresponding to the image to be loaded is moved to the display interface to obtain rendering After the image.
  • an electronic device including: a processor and a memory;
  • the memory is used to store operation instructions
  • the processor is configured to execute the above-mentioned image processing method by calling the operation instruction.
  • a computer-readable storage medium is provided, the computer storage medium is used to store computer instructions, which when run on a computer, cause the computer to execute the above-mentioned image processing method.
  • the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface After the image.
  • the above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately performing the image drawing and rendering processing, avoids the occurrence of jams in the UI interface, and increases the user experience.
  • FIG. 1 is a schematic flowchart of a barrage processing method provided by an embodiment of the disclosure
  • FIG. 2 is a schematic diagram of a specific processing flow of an implementation of the barrage processing method provided by an embodiment of the disclosure
  • FIG. 3 is a schematic structural diagram of a barrage processing device provided by an embodiment of the disclosure.
  • FIG. 4 is a schematic flowchart of an image processing method provided by an embodiment of the disclosure.
  • FIG. 5 is a schematic diagram of a specific processing flow of a possible implementation of the image processing method provided by the embodiments of the disclosure.
  • FIG. 6 is a schematic structural diagram of an image processing device provided by an embodiment of the disclosure.
  • FIG. 7 is a schematic structural diagram of an electronic device of the bullet screen processing method and the image processing method provided by the embodiments of the disclosure.
  • the present disclosure provides a barrage processing method, device, electronic equipment, and computer-readable storage medium.
  • the specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
  • the electronic device may be a terminal device or a server, which is not specifically limited in the present disclosure.
  • FIG. 1 is a schematic flow chart of a method for processing barrage provided by the present disclosure.
  • the method can be applied to an electronic device, and a main thread is created on the electronic device.
  • the method may include the following steps:
  • Step S101 drawing the barrage to be processed to obtain a drawn image
  • Step S102 performing rendering processing on the drawn image through the main thread to obtain the rendered image
  • Step S103 displaying the rendered image through the display interface.
  • the barrage to be processed is rasterized by the asynchronous thread to obtain an image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through a display interface The rendered image.
  • the above-mentioned processing provided by the present disclosure realizes the timely display of the bullet screen. Through the division and cooperation of the main thread and the asynchronous thread, the processing efficiency is improved, the stuttering phenomenon in the UI interface is avoided, and the user experience is increased, and Through the introduction of asynchronous threads, the processing speed of the main thread is improved, thereby effectively improving the fluency of the display.
  • FIG. 2 is a specific processing flow chart of an implementation of the barrage processing method provided by the present disclosure.
  • the technical solution can be applied to use scenarios such as live broadcast rooms and video playback.
  • the processing of the aforementioned step S101 specifically includes the processing of the following steps S201 to S202.
  • Step S201 Select an asynchronous thread.
  • a thread pool is created on the electronic device, and multiple asynchronous threads are stored in the thread pool.
  • an idle asynchronous thread is randomly selected from the thread pool to perform the following rasterization processing in the subsequent;
  • the selection can be based on the multiple asynchronous threads in the thread pool.
  • the preset arrangement order is not limited to the sequential arrangement in the above-mentioned examples, but can also be other arrangement orders, and the corresponding arrangement order can be configured as required.
  • live broadcast is currently being performed in a live broadcast room, and there are 16 asynchronous threads in the thread pool.
  • a barrage task arrives, 5 asynchronous threads out of the 16 asynchronous threads in the thread pool In the idle state, one asynchronous thread is randomly selected from the five idle asynchronous threads.
  • Step S202 rasterize the barrage to be processed through the selected asynchronous thread.
  • the barrage to be processed can be rasterized through the selected asynchronous thread.
  • the barrage to be processed when the barrage to be processed is rasterized through an asynchronous thread, the barrage to be processed can be rasterized through the asynchronous thread, and multiple view levels of the barrage to be processed can be drawn into one image;
  • rasterization processing it is not limited to the rasterization processing based on the cyclic recursion method, and other methods that can realize the rasterization processing can also be used; and for the above-mentioned cyclic recursion method, it is not Limited to this method, any method that can solve the same or similar technical problems and achieve the same or similar technical effects is within the protection scope of the present disclosure.
  • the processing of the foregoing step S102 specifically includes the processing of the following step S203.
  • Step S203 Perform rendering processing on the image through the main thread.
  • the aforementioned main thread may be used to perform rendering processing on the rasterized image to obtain a rendered image.
  • the processing of the aforementioned step S103 specifically includes the processing of the following step S204.
  • Step S204 Display the rendered image through the display interface.
  • the rendered image is given to a display interface (for example, a UI interface), and the rendered image is displayed through the display interface.
  • a display interface for example, a UI interface
  • the present disclosure provides a schematic structural diagram of a barrage processing device. As shown in FIG. 3, a main thread is created on the barrage processing device 30 of the present disclosure.
  • the device 30 may include a processing unit 31, a rendering unit 32, and a display unit. 33, of which,
  • the processing unit 31 is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread to obtain an image
  • the rendering unit 32 is configured to perform rendering processing on the image through the main thread to obtain a rendered image
  • the display unit 33 is configured to display the rendered image through the display interface.
  • the processing unit 31 is configured to perform rasterization processing on the barrage to be processed through an asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
  • the processing unit 31 is configured to select a preset loop recursive method through an asynchronous thread to perform rasterization processing on the barrage to be processed to obtain an image.
  • the asynchronous thread is stored in a thread pool created on the device.
  • the processing unit 31 is used to select any idle asynchronous thread in the thread pool; or, used to select an idle asynchronous thread in the thread pool according to a preset order.
  • the present disclosure also provides an image processing method, device, electronic equipment, and computer-readable storage medium.
  • the specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
  • FIG. 4 a schematic flow diagram of the image processing method provided by the present disclosure is applied to a business device, and a main thread is created on the business device.
  • the method includes the following steps:
  • Step S401 drawing the image to be loaded based on the selected asynchronous thread to obtain the drawn image
  • Step S402 performing rendering processing on the drawn image through the main thread to obtain the rendered image
  • Step S403 Display the rendered image through the display interface.
  • the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface.
  • FIG. 5 a specific processing flow chart of an implementation of the image processing method provided by this disclosure, for this technical solution, It is applied to usage scenarios such as web browsing and comment area browsing.
  • the processing of the foregoing step S401 specifically includes the processing of the following step S501.
  • step S501 the image to be loaded is drawn through the asynchronous thread.
  • the above-mentioned drawing processing can be performed through an asynchronous thread.
  • a thread pool is created on the business device, and at least one asynchronous thread is stored in the thread pool.
  • one asynchronous thread can be selected according to the arrangement order among the multiple asynchronous threads in the thread pool. Draw processing.
  • the arrangement order setting among asynchronous threads in the thread pool may be configured in advance, and the arrangement order setting does not make any specific restrictions.
  • the trigger operation may include:
  • the image to be loaded is drawn.
  • the correspondence between the cell corresponding to the image to be loaded and the display interface may include any of the following:
  • the above loading method may be called a real-time loading method, that is, as long as the cell corresponding to the image to be loaded is moved to the current display interface, the image to be loaded corresponding to the cell will be drawn accordingly.
  • the cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  • the above loading method can be referred to as the preloading method, that is, when the cell in the current display interface and the cell corresponding to the image to be loaded have a certain positional relationship, such as the cell A in the current display interface The position is 1, and the position of cell B corresponding to the image to be loaded is 4, that is, the cell A is the fourth cell adjacent to cell B. At this time, the corresponding pre-loaded image will be performed. Load processing, so that the pre-loaded image can be directly extracted to the main thread for rendering processing later.
  • the above-mentioned cells may be stored in a cell list, and all the cells in the cell list may also be arranged in a predetermined order.
  • processing of the foregoing step S402 specifically includes the processing of the following step S502.
  • Step S502 Perform rendering processing on the drawn image through the main thread.
  • the drawn image when the cell corresponding to the image to be loaded is moved to the display interface, the drawn image can be rendered through the above-mentioned main thread to obtain the rendered image.
  • the image to be loaded adopts the above-mentioned real-time loading method
  • the image to be loaded is drawn through the selected asynchronous thread, and the image is drawn.
  • the obtained image is given to the main thread, and the main thread performs rendering processing on the drawn image.
  • the drawing image corresponding to the image to be loaded is directly extracted, and the The obtained image is given to the main thread, and the main thread performs rendering processing on the drawn image.
  • the processing of the aforementioned step S403 specifically includes the processing of the following step S503.
  • Step S503 Display the rendered image through the display interface.
  • the rendered image is displayed on the UI interface.
  • the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface.
  • the above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately drawing and rendering the image, avoids the occurrence of jams in the UI interface, and increases the user’s experience.
  • the introduction of asynchronous threads improves the processing speed of the main thread, which effectively improves the fluency of the display.
  • the present disclosure also provides a schematic structural diagram of an image processing device. As shown in FIG. 6, a main thread is created on the image processing device 60 of the present disclosure.
  • the device 60 may include: a drawing unit 61, a rendering unit 62, and a display unit 63. And a processing unit 64, in which,
  • the drawing unit 61 is configured to draw the image to be loaded based on the selected asynchronous thread to obtain the drawn image
  • the rendering unit 62 is configured to perform rendering processing on the drawn image through the main thread to obtain the rendered image
  • the display unit 63 is configured to display the rendered image through the display interface.
  • asynchronous threads are stored in a thread pool created on the device
  • the drawing unit 61 is used to select any asynchronous thread in the thread pool; or, used to select an asynchronous thread in the thread pool in a preset order.
  • it also includes:
  • the processing unit 64 is configured to draw the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
  • the corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any of the following:
  • the cell corresponding to the image to be loaded is in the display interface
  • the cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  • the rendering unit 62 is configured to perform rendering processing on the drawn image through the main thread when the cell corresponding to the image to be loaded is moved to the display interface to obtain the rendered image.
  • the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface.
  • the above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately drawing and rendering the image, avoids the occurrence of jams in the UI interface, and increases the user’s experience.
  • the introduction of asynchronous threads improves the processing speed of the main thread, which effectively improves the fluency of the display.
  • FIG. 7 shows a schematic structural diagram of an electronic device (for example, the terminal device or the server in FIG. 1) 700 suitable for implementing the embodiments of the present disclosure.
  • Terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals ( For example, mobile terminals such as car navigation terminals and fixed terminals such as digital TVs and desktop computers.
  • the electronic device shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
  • the electronic device 700 may include a processing device (such as a central processing unit, a graphics processor, etc.) 701, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 702 or from a storage device 708.
  • the program in the memory (RAM) 703 executes various appropriate actions and processing.
  • various programs and data required for the operation of the electronic device 700 are also stored.
  • the processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704.
  • An input/output (I/O) interface 705 is also connected to the bus 704.
  • the following devices can be connected to the I/O interface 705: including input devices 706 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 707 such as a device; a storage device 708 such as a magnetic tape and a hard disk; and a communication device 709.
  • the communication device 709 may allow the electronic device 700 to perform wireless or wired communication with other devices to exchange data.
  • FIG. 7 shows an electronic device 700 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
  • the process described above with reference to the flowchart can be implemented as a computer software program.
  • the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702.
  • the processing device 701 the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
  • the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two.
  • the computer-readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • the computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium.
  • the computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device .
  • the program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs.
  • the electronic device obtains at least two Internet protocol addresses; and sends to the node evaluation device including the at least two A node evaluation request for an Internet Protocol address, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein, the obtained The Internet Protocol address indicates the edge node in the content distribution network.
  • the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; Among the at least two Internet Protocol addresses, select the Internet Protocol address; return the selected Internet Protocol address; wherein, the received Internet Protocol address indicates the edge node in the content distribution network.
  • the computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof.
  • the above-mentioned programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language.
  • the program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server.
  • the remote computer can be connected to the user’s computer through any kind of network including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
  • LAN local area network
  • WAN wide area network
  • each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logic function Executable instructions.
  • the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved.
  • each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances.
  • the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses.”
  • the present disclosure provides a computer-readable storage medium for storing computer instructions, which when run on a computer, cause the computer to execute the above-mentioned barrage processing method or image processing method.
  • the computer-readable storage medium provided in the present disclosure is applicable to any embodiment of the above method, and will not be repeated here.
  • the various modules of the device of the present disclosure can be integrated or deployed separately.
  • the above modules can be combined into one module or further divided into multiple sub-modules.
  • modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed to be located in one or more devices different from this embodiment.
  • the modules of the above-mentioned embodiments can be combined into one module, or further divided into multiple sub-modules.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The present disclosure relates to a view processing method and apparatus, and an electronic device and a computer-readable storage medium, and an image processing method and apparatus, and an electronic device and a computer-readable storage medium. The view processing method is applied to an electronic device, and a main thread and an asynchronous thread are created on the electronic device. The method comprises: carrying out, by means of an asynchronous thread, rasterization processing on a view to be processed, so as to obtain an image; carrying out rendering processing on the drawn image by means of a main thread, so as to obtain a rendered image; and displaying the rendered image by means of a display interface. The present disclosure realizes the timely display of a view; by means of the cooperation of a main thread and an asynchronous thread, the processing efficiency is improved, the occurrence of a lag phenomenon in a UI is prevented, and the usage experience of a user is improved; and by means of introducing the asynchronous thread, the processing speed of the main thread is improved, thereby effectively improving the display fluency.

Description

弹幕处理方法、装置、电子设备及计算机可读存储介质、以及图像处理方法、装置、电子设备及计算机可读存储介质Barrage processing method, device, electronic device, and computer-readable storage medium, and image processing method, device, electronic device, and computer-readable storage medium
相关申请的交叉引用Cross references to related applications
本申请要求2019年01月31日在中国知识产权局提交的中国专利申请No.201910099987X以及2019年01月31日在中国知识产权局提交的中国专利申请No.2019100999865的优先权,通过引用将中国专利申请公开的全部内容并入本文。This application claims the priority of the Chinese patent application No. 201910099987X filed at the China Intellectual Property Office on January 31, 2019 and the Chinese patent application No. 2019100999865 filed at the China Intellectual Property Office on January 31, 2019. China is incorporated by reference. The entire disclosure of the patent application is incorporated herein.
技术领域Technical field
本公开涉及应用软件技术领域,特别是涉及一种弹幕处理方法、装置、电子设备及计算机可读存储介质,并且本公开还涉及一种图像处理方法、装置、电子设备及计算机可读存储介。The present disclosure relates to the technical field of application software, in particular to a barrage processing method, device, electronic equipment, and computer-readable storage medium, and the present disclosure also relates to an image processing method, device, electronic equipment, and computer-readable storage medium .
背景技术Background technique
在现有技术中,一个弹幕(view)包括很多个视图层级(子view),如用户的头像、多个图片、多个文字、背景、特效等不同视图层级,即使是最简单的弹幕,也包括一个头像、一句话、一个背景这3个视图层级。In the prior art, a bullet screen (view) includes many view levels (sub-views), such as a user’s avatar, multiple pictures, multiple text, background, special effects and other different view levels, even the simplest bullet screen , Also includes 3 view levels: an avatar, a sentence, and a background.
对于直播间等场景来说,简单的弹幕不能满足用户的需求,需要多样化的视图层级。当系统要显示一个弹幕时,主线程要对每个视图层级分别进行渲染,这样的渲染处理效率很低,尤其当有成千上万的用户同时发弹幕时,导致出现明显的卡顿现象,影响了用户的使用体验。For scenes such as live broadcast rooms, simple bullet screens cannot meet the needs of users and require diversified view levels. When the system wants to display a bullet screen, the main thread has to render each view level separately. This rendering processing efficiency is very low, especially when thousands of users send bullet screens at the same time, resulting in obvious lag This phenomenon has affected the user experience.
此外,在现有技术中,用户触发UI(User Interface,用户界面)的图文显示时,通常是通过主线程来读取、解码、渲染图片,但是由于读取、解码的过程非常耗时,并且非常占用较多的CPU资源,导致可能无法及时地对用户的操作做出响应,导致图文无法随着用户的操作实时地显示出来,从而使得用户 看来,该UI界面就产生了卡顿现象,影响了用户的使用体验。In addition, in the prior art, when the user triggers the graphic display of the UI (User Interface, user interface), the picture is usually read, decoded, and rendered through the main thread. However, the process of reading and decoding is very time-consuming. And it takes up a lot of CPU resources, which may not be able to respond to user operations in a timely manner, resulting in graphics and texts that cannot be displayed in real time with user operations, which makes the user’s view that the UI interface has stalled This phenomenon has affected the user experience.
发明内容Summary of the invention
本公开提供了一种弹幕处理方法、装置、电子设备及计算机可读存储介质,以实现对弹幕的及时显示,避免卡顿现象的发生。The present disclosure provides a barrage processing method, device, electronic equipment, and computer-readable storage medium, so as to realize the timely display of the barrage and avoid the occurrence of the jam phenomenon.
第一方面,提供了一种弹幕处理方法,应用于电子设备上,所述电子设备上创建有主线程以及异步线程,所述方法包括:In a first aspect, a method for processing barrage is provided, which is applied to an electronic device with a main thread and an asynchronous thread created on the electronic device, and the method includes:
通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;Rasterize the barrage to be processed by the asynchronous thread to obtain an image;
通过所述主线程对所述图像进行渲染处理,得到渲染后的图像;以及Performing rendering processing on the image by the main thread to obtain a rendered image; and
通过显示界面显示所述渲染后的图像。The rendered image is displayed through the display interface.
在一个实现方式中,所述通过所述异步线程对待处理弹幕进行栅格化处理,得到图像,包括:In an implementation manner, the rasterizing the barrage to be processed by the asynchronous thread to obtain an image includes:
通过所述异步线程对所述待处理弹幕进行栅格化处理,将所述待处理弹幕的多个视图层级绘制成一个图像。Perform rasterization processing on the barrage to be processed by the asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
在一个实现方式中,所述通过所述异步线程对所述待处理弹幕进行栅格化处理,得到图像,包括:In an implementation manner, the performing rasterization processing on the to-be-processed barrage by the asynchronous thread to obtain an image includes:
通过所述异步线程选取预设的循环递归方法对所述待处理弹幕进行栅格化处理,得到图像。A preset loop recursive method is selected by the asynchronous thread to rasterize the to-be-processed barrage to obtain an image.
在一个实现方式中,所述异步线程存储于所述电子设备上创建的线程池中,In an implementation manner, the asynchronous thread is stored in a thread pool created on the electronic device,
所述异步线程的选取,包括如下任一项:The selection of the asynchronous thread includes any one of the following:
在所述线程池中选取任一空闲的异步线程;Select any idle asynchronous thread in the thread pool;
在所述线程池中按照预设顺序选取一个空闲的异步线程。An idle asynchronous thread is selected in the thread pool according to a preset order.
第二方面,提供了一种弹幕处理装置,所述装置上创建有主线程以及异步线程,所述装置包括:In a second aspect, a barrage processing device is provided. The device has a main thread and an asynchronous thread created on the device, and the device includes:
处理单元,用于通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;The processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread to obtain an image;
渲染单元,用于通过所述主线程对所述图像进行渲染处理,得到渲染后的图像;以及A rendering unit, configured to perform rendering processing on the image through the main thread to obtain a rendered image; and
显示单元,用于通过显示界面显示所述渲染后的图像。The display unit is configured to display the rendered image through a display interface.
在一个实现方式中,所述处理单元,用于通过所述异步线程对所述待处理弹幕进行栅格化处理,将所述待处理弹幕的多个视图层级绘制成一个图像。In one implementation, the processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
在一个实现方式中,所述处理单元,用于通过所述异步线程选取预设的循环递归方法对所述待处理弹幕进行栅格化处理,得到图像。In one implementation, the processing unit is configured to select a preset loop recursive method through the asynchronous thread to rasterize the to-be-processed barrage to obtain an image.
在一个实现方式中,所述异步线程存储于所述装置上创建的线程池中,In one implementation, the asynchronous thread is stored in a thread pool created on the device,
所述处理单元,用于在所述线程池中选取任一空闲的异步线程;或,用于在所述线程池中按照预设顺序选取一个空闲的异步线程。The processing unit is used to select any idle asynchronous thread in the thread pool; or, used to select an idle asynchronous thread in the thread pool in a preset order.
第三方面,提供了一种电子设备,包括:处理器和存储器;In a third aspect, an electronic device is provided, including: a processor and a memory;
所述存储器,用于存储操作指令;The memory is used to store operation instructions;
所述处理器,用于通过调用所述操作指令,执行上述的弹幕处理方法。The processor is configured to execute the above-mentioned barrage processing method by calling the operation instruction.
第四方面,提供了一种计算机可读存储介质,所述计算机存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机执行上述的弹幕处理方法。In a fourth aspect, a computer-readable storage medium is provided, the computer storage medium is used to store computer instructions, which when run on a computer, cause the computer to execute the above-mentioned barrage processing method.
借由上述技术方案,本公开提供的技术方案至少具有下列优点:With the above technical solutions, the technical solutions provided by the present disclosure have at least the following advantages:
本公开中,通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示所述渲染后的图像。本公开提供的上述处理,实现了对弹幕的及时显示,通过主线程与异步线程的分工合作,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验,并且通过异步线程的引入,提升了主线程的处理速度,进而有效提升了显示的流畅性。In the present disclosure, the barrage to be processed is rasterized by the asynchronous thread to obtain an image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through a display interface The rendered image. The above-mentioned processing provided by the present disclosure realizes the timely display of the bullet screen. Through the division and cooperation of the main thread and the asynchronous thread, the processing efficiency is improved, the stuttering phenomenon in the UI interface is avoided, and the user experience is increased, and Through the introduction of asynchronous threads, the processing speed of the main thread is improved, thereby effectively improving the fluency of the display.
本公开还提供了一种图像处理方法、装置、电子设备及计算机可读存储介质,以实现对图文的及时显示,避免卡顿现象的发生。The present disclosure also provides an image processing method, device, electronic equipment, and computer-readable storage medium, so as to realize the timely display of graphics and text and avoid the occurrence of jams.
第五方面,提供了一种图像处理方法,应用于业务设备上,所述业务设备上创建有主线程,所述方法包括:In a fifth aspect, an image processing method is provided, which is applied to a business device, where a main thread is created on the business device, and the method includes:
基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;Draw the image to be loaded based on the selected asynchronous thread, and get the drawn image;
通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;Performing rendering processing on the drawn image by the main thread to obtain a rendered image;
通过显示界面显示所述渲染后的图像。The rendered image is displayed through the display interface.
在一个实现方式中,所述异步线程存储于所述业务设备上创建的线程池中,In an implementation manner, the asynchronous thread is stored in a thread pool created on the service device,
所述选取异步线程,包括如下任一项:The selection of asynchronous threads includes any of the following:
在所述线程池中选取任一异步线程;Select any asynchronous thread in the thread pool;
在所述线程池中按照预设顺序选取一个异步线程。An asynchronous thread is selected in the thread pool according to a preset sequence.
在一个实现方式中,所述对待加载图像进行绘制的触发处理,包括:In an implementation manner, the trigger processing for drawing the image to be loaded includes:
基于所述待加载图像对应的单元格与显示界面的对应关系,对所述待加载图像进行绘制;Drawing the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
所述待加载图像对应的单元格与显示界面的对应关系,包括如下任一项:The corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
所述待加载图像对应的单元格处于所述显示界面中;The cell corresponding to the image to be loaded is in the display interface;
所述待加载图像对应的单元格为所述显示界面当前所显示的单元格相邻的预设个数的单元格。The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
在一个实现方式中,所述通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像,包括:In an implementation manner, the performing rendering processing on the drawn image by the main thread to obtain the rendered image includes:
当所述待加载图像对应的单元格移动到所述显示界面中时,通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像。When the cell corresponding to the image to be loaded is moved to the display interface, the drawn image is rendered by the main thread to obtain the rendered image.
第六方面,提供了一种图像处理装置,其中,所述装置上创建有主线程,所述装置包括:In a sixth aspect, an image processing device is provided, wherein a main thread is created on the device, and the device includes:
绘制单元,用于基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;The drawing unit is used to draw the image to be loaded based on the selected asynchronous thread to obtain the drawn image;
渲染单元,用于通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;A rendering unit, configured to perform rendering processing on the drawn image through the main thread to obtain a rendered image;
显示单元,用于通过显示界面显示所述渲染后的图像。The display unit is configured to display the rendered image through a display interface.
在一个实现方式中,所述异步线程存储于所述装置上创建的线程池中,In one implementation, the asynchronous thread is stored in a thread pool created on the device,
所述绘制单元,用于在所述线程池中选取任一异步线程;或,用于在所述线程池中按照预设顺序选取一个异步线程。The drawing unit is used to select any asynchronous thread in the thread pool; or, to select an asynchronous thread in the thread pool in a preset order.
在一个实现方式中,还包括:In one implementation, it also includes:
处理单元,用于基于所述待加载图像对应的单元格与显示界面的对应关系,对所述待加载图像进行绘制;A processing unit, configured to draw the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
所述待加载图像对应的单元格与显示界面的对应关系,包括如下任一项:The corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
所述待加载图像对应的单元格处于所述显示界面中;The cell corresponding to the image to be loaded is in the display interface;
所述待加载图像对应的单元格为所述显示界面当前所显示的单元格相邻的预设个数的单元格。The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
在一个实现方式中,所述渲染单元,用于当所述待加载图像对应的单元格移动到所述显示界面中时,通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像。In one implementation, the rendering unit is configured to perform rendering processing on the drawn image through the main thread when the cell corresponding to the image to be loaded is moved to the display interface to obtain rendering After the image.
第七方面,提供了一种电子设备,包括:处理器和存储器;In a seventh aspect, an electronic device is provided, including: a processor and a memory;
所述存储器,用于存储操作指令;The memory is used to store operation instructions;
所述处理器,用于通过调用所述操作指令,执行上述的图像处理方法。The processor is configured to execute the above-mentioned image processing method by calling the operation instruction.
第八方面,提供了一种计算机可读存储介质,所述计算机存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机执行上述的图像处理方法。In an eighth aspect, a computer-readable storage medium is provided, the computer storage medium is used to store computer instructions, which when run on a computer, cause the computer to execute the above-mentioned image processing method.
借由上述技术方案,本公开提供的技术方案至少具有下列优点:With the above technical solutions, the technical solutions provided by the present disclosure have at least the following advantages:
本公开中,基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示所述渲染后的图像。本公开提供的上述处理,实现了对图像的及时显示,通过分开进行图像的绘制与渲染处理,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验。In the present disclosure, the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface After the image. The above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately performing the image drawing and rendering processing, avoids the occurrence of jams in the UI interface, and increases the user experience.
附图说明Description of the drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本公开的实施例的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:By reading the detailed description of the preferred embodiments below, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only used for the purpose of illustrating the preferred embodiments, and are not considered as a limitation to the embodiments of the present disclosure. Also, throughout the drawings, the same reference symbols are used to denote the same components. In the attached picture:
图1为本公开的实施例提供的弹幕处理方法的流程示意图;FIG. 1 is a schematic flowchart of a barrage processing method provided by an embodiment of the disclosure;
图2为本公开的实施例提供的弹幕处理方法的一种实现方式的具体处理流程示意图;2 is a schematic diagram of a specific processing flow of an implementation of the barrage processing method provided by an embodiment of the disclosure;
图3为本公开的实施例提供的弹幕处理装置的结构示意图;3 is a schematic structural diagram of a barrage processing device provided by an embodiment of the disclosure;
图4为本公开的实施例提供的图像处理方法的流程示意图;4 is a schematic flowchart of an image processing method provided by an embodiment of the disclosure;
图5为本公开的实施例提供的图像处理方法的一种可能实现方式的具体处理流程示意图;5 is a schematic diagram of a specific processing flow of a possible implementation of the image processing method provided by the embodiments of the disclosure;
图6为本公开的实施例提供的图像处理装置的结构示意图;以及FIG. 6 is a schematic structural diagram of an image processing device provided by an embodiment of the disclosure; and
图7为本公开的实施例提供的弹幕处理方法以及图像处理方法的电子设备的结构示意图。FIG. 7 is a schematic structural diagram of an electronic device of the bullet screen processing method and the image processing method provided by the embodiments of the disclosure.
具体实施方式detailed description
本公开提供了一种弹幕处理方法、装置、电子设备及计算机可读存储介质,下面结合附图,对本公开具体实施方式进行详细说明。The present disclosure provides a barrage processing method, device, electronic equipment, and computer-readable storage medium. The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
下面详细描述本公开的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本公开,而不能解释为对本公开的限制。The embodiments of the present disclosure are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals indicate the same or similar elements or elements with the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary, and are only used to explain the present disclosure, and cannot be construed as limiting the present disclosure.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本公开的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作、元件和/或组件,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作、元件、组件和/或它们的组。应该理解,当我们称元件被“连接”或“耦接”到另一元件 时,它可以直接连接或耦接到其他元件,或者也可以存在中间元件。此外,这里使用的“连接”或“耦接”可以包括无线连接或无线耦接。这里使用的措辞“和/或”包括一个或更多个相关联的列出项的全部或任一单元和全部组合。Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present disclosure refers to the presence of the described features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element, or intervening elements may also be present. In addition, “connected” or “coupled” used herein may include wireless connection or wireless coupling. The term "and/or" as used herein includes all or any unit and all combinations of one or more associated listed items.
本技术领域技术人员可以理解,除非另外定义,这里使用的所有术语(包括技术术语和科学术语),具有与本公开所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语,应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样被特定定义,否则不会用理想化或过于正式的含义来解释。Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meanings as those commonly understood by those skilled in the art to which this disclosure belongs. It should also be understood that terms such as those defined in general dictionaries should be understood as having a meaning consistent with the meaning in the context of the prior art, and unless specifically defined as here, they will not be idealized or overly Explain the formal meaning.
为使本公开的目的、技术方案和优点更加清楚,下面将结合附图对本公开的实施例作进一步地详细描述。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例中不再赘述。在本公开中,该电子设备可以是终端设备,也可以是服务器,在本公开中并不做具体限定。In order to make the objectives, technical solutions and advantages of the present disclosure clearer, the embodiments of the present disclosure will be described in further detail below in conjunction with the accompanying drawings. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. In the present disclosure, the electronic device may be a terminal device or a server, which is not specifically limited in the present disclosure.
图1为本公开提供的弹幕处理方法的流程示意图,该方法可以应用于电子设备上,电子设备上创建有主线程,该方法可以包括如下步骤:FIG. 1 is a schematic flow chart of a method for processing barrage provided by the present disclosure. The method can be applied to an electronic device, and a main thread is created on the electronic device. The method may include the following steps:
步骤S101,对待处理弹幕进行绘制,得到绘制后的图像;Step S101, drawing the barrage to be processed to obtain a drawn image;
步骤S102,通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;以及Step S102, performing rendering processing on the drawn image through the main thread to obtain the rendered image; and
步骤S103,通过显示界面显示渲染后的图像。Step S103, displaying the rendered image through the display interface.
本公开中,通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示所述渲染后的图像。本公开提供的上述处理,实现了对弹幕的及时显示,通过主线程与异步线程的分工合作,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验,并且通过异步线程的引入,提升了主线程的处理速度,进而有效提升了显示的流畅性。In the present disclosure, the barrage to be processed is rasterized by the asynchronous thread to obtain an image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through a display interface The rendered image. The above-mentioned processing provided by the present disclosure realizes the timely display of the bullet screen. Through the division and cooperation of the main thread and the asynchronous thread, the processing efficiency is improved, the stuttering phenomenon in the UI interface is avoided, and the user experience is increased, and Through the introduction of asynchronous threads, the processing speed of the main thread is improved, thereby effectively improving the fluency of the display.
基于上述本公开所提供的技术方案,下面对该技术方案进行详尽阐释。图2为本公开提供的弹幕处理方法的一个实现方式的具体处理流程图,对于本技术方案,可以应用于直播间、视频播放等使用场景。Based on the above technical solution provided by the present disclosure, the technical solution will be explained in detail below. FIG. 2 is a specific processing flow chart of an implementation of the barrage processing method provided by the present disclosure. The technical solution can be applied to use scenarios such as live broadcast rooms and video playback.
在一个实现方式中,前述步骤S101的处理具体包括下述步骤S201~步骤S202的处理。In an implementation manner, the processing of the aforementioned step S101 specifically includes the processing of the following steps S201 to S202.
步骤S201,选取异步线程。Step S201: Select an asynchronous thread.
对于本公开,在电子设备上创建有一个线程池,且在该线程池中存储有多个异步线程。For the present disclosure, a thread pool is created on the electronic device, and multiple asynchronous threads are stored in the thread pool.
对于本公开,在进行异步线程选取时,可以包括如下两种方式:For the present disclosure, when selecting asynchronous threads, the following two methods can be included:
1)在线程池中选取任一空闲的异步线程;1) Select any idle asynchronous thread in the thread pool;
具体地,从该线程池中随机选取一个空闲的异步线程,以在后续进行下述的栅格化处理;Specifically, an idle asynchronous thread is randomly selected from the thread pool to perform the following rasterization processing in the subsequent;
2)在线程池中按照预设顺序选取一个空闲的异步线程。2) Select an idle asynchronous thread in the thread pool according to a preset order.
具体地,该线程池中存储有多个异步线程,且这些异步线程中,有的异步线程当前处于空闲状态,有的可能处于工作状态,因此在选取时,可以基于线程池中该多个异步线程间具有预设的排列顺序,来选取一个空闲的异步线程进行上述的绘制处理。如果预设的排列顺序为顺次排列,则可以按照顺次排列顺序依次选取首个空闲的异步线程。当然,该预设的排列顺序并不仅局限于上述所举实例中的顺次排列,还可以是其他的排列顺序,可以根据需要配置相应的排列顺序。Specifically, there are multiple asynchronous threads stored in the thread pool, and among these asynchronous threads, some asynchronous threads are currently idle, and some may be working. Therefore, the selection can be based on the multiple asynchronous threads in the thread pool. There is a preset arrangement sequence among the threads to select an idle asynchronous thread to perform the above-mentioned drawing processing. If the preset arrangement order is sequential arrangement, the first idle asynchronous thread can be selected in sequence according to the sequential arrangement order. Of course, the preset arrangement order is not limited to the sequential arrangement in the above-mentioned examples, but can also be other arrangement orders, and the corresponding arrangement order can be configured as required.
在一个具体实施例中,在一个直播间中当前进行直播,线程池中有16个异步线程,当有一个弹幕任务到来时,此时线程池中的16个异步线程中有5个异步线程处于空闲状态,则在这5个空闲的异步线程中随机选取1个异步线程。In a specific embodiment, live broadcast is currently being performed in a live broadcast room, and there are 16 asynchronous threads in the thread pool. When a barrage task arrives, 5 asynchronous threads out of the 16 asynchronous threads in the thread pool In the idle state, one asynchronous thread is randomly selected from the five idle asynchronous threads.
步骤S202,通过选取的异步线程对待处理弹幕进行栅格化处理。Step S202, rasterize the barrage to be processed through the selected asynchronous thread.
对于本公开,在选取到合适的异步线程后,可以通过该选取的异步线程对待处理的弹幕进行栅格化处理。For the present disclosure, after a suitable asynchronous thread is selected, the barrage to be processed can be rasterized through the selected asynchronous thread.
对于本公开,在通过异步线程对待处理的弹幕进行栅格化处理时,可以通过异步线程对待处理弹幕进行栅格化处理,将待处理弹幕的多个视图层级绘制成一个图像;For the present disclosure, when the barrage to be processed is rasterized through an asynchronous thread, the barrage to be processed can be rasterized through the asynchronous thread, and multiple view levels of the barrage to be processed can be drawn into one image;
其中,要将待处理弹幕的多个视图层级绘制成一个图像,可以根据预设的循环递归方法来进行相应的栅格化处理操作来实现。Among them, to draw multiple view levels of the barrage to be processed into one image can be achieved by performing corresponding rasterization processing operations according to a preset loop recursion method.
其中,对于上述的栅格化处理,其并不局限于采用基于循环递归方法的栅格化处理,还可以采用其他可以实现栅格化处理的方法;且对于上述的循环递归方法,也并不局限于该方法,对于任意能够解决与其具有相同或相似的技术问题,且能够达到相同或相似的技术效果的方法均在本公开的保护范围之内。Among them, for the above-mentioned rasterization processing, it is not limited to the rasterization processing based on the cyclic recursion method, and other methods that can realize the rasterization processing can also be used; and for the above-mentioned cyclic recursion method, it is not Limited to this method, any method that can solve the same or similar technical problems and achieve the same or similar technical effects is within the protection scope of the present disclosure.
在一个实现方式中,前述步骤S102的处理具体包括下述步骤S203的处理。In an implementation manner, the processing of the foregoing step S102 specifically includes the processing of the following step S203.
步骤S203,通过主线程对图像进行渲染处理。Step S203: Perform rendering processing on the image through the main thread.
对于本公开,当待处理弹幕经过上述栅格化处理得到图像后,可以通过上述的主线程来对经栅格化处理后的图像进行渲染处理,从而得到渲染后的图像。For the present disclosure, after the barrage to be processed has undergone the aforementioned rasterization processing to obtain an image, the aforementioned main thread may be used to perform rendering processing on the rasterized image to obtain a rendered image.
在一个实现方式中,前述步骤S103的处理具体包括下述步骤S204的处理。In an implementation manner, the processing of the aforementioned step S103 specifically includes the processing of the following step S204.
步骤S204,通过显示界面显示渲染后的图像。Step S204: Display the rendered image through the display interface.
对于本公开,在由主线程对图像渲染后,将渲染后的图像给到显示界面(例如,UI界面)上,通过显示界面对该渲染后的图像进行显示。For the present disclosure, after the image is rendered by the main thread, the rendered image is given to a display interface (for example, a UI interface), and the rendered image is displayed through the display interface.
其中,在本公开中,无论是上述的图像栅格化处理过程,还是图像渲染过程,或者是图像的显示过程,均可以采用现有的对应操作进行处理,故在本公开技术方案中不对具体的图像栅格化处理过程、图像渲染过程以及图像显示过程做具体阐释。Among them, in the present disclosure, whether it is the above-mentioned image rasterization process, image rendering process, or image display process, existing corresponding operations can be used for processing, so the technical solutions of the present disclosure do not deal with specific The image rasterization process, image rendering process and image display process are explained in detail.
本公开提供了一种弹幕处理装置的结构示意图,如图3所示,本公开的弹幕处理装置30上创建有主线程,该装置30可以包括:处理单元31、渲染单元32以及显示单元33,其中,The present disclosure provides a schematic structural diagram of a barrage processing device. As shown in FIG. 3, a main thread is created on the barrage processing device 30 of the present disclosure. The device 30 may include a processing unit 31, a rendering unit 32, and a display unit. 33, of which,
处理单元31,用于通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;The processing unit 31 is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread to obtain an image;
渲染单元32,用于通过主线程对图像进行渲染处理,得到渲染后的图像;以及The rendering unit 32 is configured to perform rendering processing on the image through the main thread to obtain a rendered image; and
显示单元33,用于通过显示界面显示渲染后的图像。The display unit 33 is configured to display the rendered image through the display interface.
在一个实现方式中,处理单元31,用于通过异步线程对待处理弹幕进行栅格化处理,将待处理弹幕的多个视图层级绘制成一个图像。In one implementation, the processing unit 31 is configured to perform rasterization processing on the barrage to be processed through an asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
在一个实现方式中,处理单元31,用于通过异步线程选取预设的循环递归方法对待处理弹幕进行栅格化处理,得到图像。In an implementation manner, the processing unit 31 is configured to select a preset loop recursive method through an asynchronous thread to perform rasterization processing on the barrage to be processed to obtain an image.
在一个实现方式中,所述异步线程存储于所述装置上创建的线程池中。In one implementation, the asynchronous thread is stored in a thread pool created on the device.
所述处理单元31,用于在线程池中选取任一空闲的异步线程;或,用于在所述线程池中按照预设顺序选取一个空闲的异步线程。The processing unit 31 is used to select any idle asynchronous thread in the thread pool; or, used to select an idle asynchronous thread in the thread pool according to a preset order.
本公开还提供了一种图像处理方法、装置、电子设备及计算机可读存储介质,下面结合附图,对本公开的具体实施方式进行详细说明。The present disclosure also provides an image processing method, device, electronic equipment, and computer-readable storage medium. The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.
如图4所示,为本公开提供的图像处理方法的流程示意图,应用于业务设备上,业务设备上创建有主线程,该方法包括如下步骤:As shown in FIG. 4, a schematic flow diagram of the image processing method provided by the present disclosure is applied to a business device, and a main thread is created on the business device. The method includes the following steps:
步骤S401,基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;Step S401, drawing the image to be loaded based on the selected asynchronous thread to obtain the drawn image;
步骤S402,通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;Step S402, performing rendering processing on the drawn image through the main thread to obtain the rendered image;
步骤S403,通过显示界面显示渲染后的图像。Step S403: Display the rendered image through the display interface.
本公开中,基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示渲染后的图像。本公开提供的上述处理,实现了对图像的及时显示,通过分开进行图像的绘制与渲染处理,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验。In this disclosure, the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface. The above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately performing the image drawing and rendering processing, avoids the occurrence of jams in the UI interface, and increases the user experience.
基于上述本公开所提供的技术方案,下面对该技术方案进行详尽阐释,如图5所示,为本公开提供的图像处理方法的一个实现方式的具体处理流程图,对于本技术方案,可以应用于网页浏览、评论区浏览等使用场景。Based on the above technical solution provided by the present disclosure, the technical solution will be explained in detail below. As shown in FIG. 5, a specific processing flow chart of an implementation of the image processing method provided by this disclosure, for this technical solution, It is applied to usage scenarios such as web browsing and comment area browsing.
在一个实现方式中,前述步骤S401的处理具体包括下述步骤S501的处理。In an implementation manner, the processing of the foregoing step S401 specifically includes the processing of the following step S501.
步骤S501,通过异步线程对待加载图像进行绘制。In step S501, the image to be loaded is drawn through the asynchronous thread.
对于本公开,在需要对待加载图像进行绘制时,可以通过异步线程来进行上述绘制处理。For the present disclosure, when the image to be loaded needs to be drawn, the above-mentioned drawing processing can be performed through an asynchronous thread.
在一个实现方式中,对于上述的异步线程选取,可以包括如下两种方式:In an implementation manner, for the foregoing asynchronous thread selection, the following two methods may be included:
在业务设备上创建有一个线程池,且在该线程池中存储有至少一个异步线程。A thread pool is created on the business device, and at least one asynchronous thread is stored in the thread pool.
1)在线程池中选取任一异步线程;1) Select any asynchronous thread in the thread pool;
具体地,从该线程池中随机选取一个异步线程来进行上述的绘制处理;Specifically, randomly select an asynchronous thread from the thread pool to perform the aforementioned drawing processing;
2)在线程池中按照预设顺序选取一个异步线程。2) Select an asynchronous thread in the thread pool according to a preset order.
具体地,该线程池中存储有多个异步线程,且该多个异步线程间具有一定的排列顺序,则可以按照线程池中该多个异步线程间的排列顺序来选取一个异步线程进行上述的绘制处理。Specifically, if multiple asynchronous threads are stored in the thread pool, and the multiple asynchronous threads have a certain arrangement order, then one asynchronous thread can be selected according to the arrangement order among the multiple asynchronous threads in the thread pool. Draw processing.
其中,对于线程池中异步线程间的排列顺序设置,可以是预先进行配置的,且该排列顺序的设置不做任何具体限定。Wherein, the arrangement order setting among asynchronous threads in the thread pool may be configured in advance, and the arrangement order setting does not make any specific restrictions.
在一个实现方式中,对于对待加载图像进行绘制的处理,其触发操作可以包括:In an implementation manner, for the processing of drawing the image to be loaded, the trigger operation may include:
基于待加载图像对应的单元格与显示界面的对应关系,对待加载图像进行绘制。Based on the correspondence between the cell corresponding to the image to be loaded and the display interface, the image to be loaded is drawn.
其中,待加载图像对应的单元格与显示界面的对应关系,可以包括如下任一种:Wherein, the correspondence between the cell corresponding to the image to be loaded and the display interface may include any of the following:
1)待加载图像对应的单元格处于显示界面中;1) The cell corresponding to the image to be loaded is in the display interface;
对于本公开,上述加载方式可以称之为实时加载方式,即只要待加载图像对应的单元格移动到当前的显示界面中,就会对该单元格对应的待加载图像进行相应的绘制处理。For the present disclosure, the above loading method may be called a real-time loading method, that is, as long as the cell corresponding to the image to be loaded is moved to the current display interface, the image to be loaded corresponding to the cell will be drawn accordingly.
2)待加载图像对应的单元格为显示界面当前所显示的单元格相邻的预设个数的单元格。2) The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
对于本公开,上述加载方式可以称之为预加载方式,即当前显示界面中的单元格与该待加载图像所对应的单元格具有一定的位置关系时,如当前显 示界面中的单元格A的位置为1,待加载图像对应的单元格B的位置为4,也即该单元格A为该单元格B相邻的第4个单元格,此时也会对该待加载图像进行相应的预加载处理,以在后续可以直接提取该预加载得到的图像给到主线程进行渲染处理。For the present disclosure, the above loading method can be referred to as the preloading method, that is, when the cell in the current display interface and the cell corresponding to the image to be loaded have a certain positional relationship, such as the cell A in the current display interface The position is 1, and the position of cell B corresponding to the image to be loaded is 4, that is, the cell A is the fourth cell adjacent to cell B. At this time, the corresponding pre-loaded image will be performed. Load processing, so that the pre-loaded image can be directly extracted to the main thread for rendering processing later.
其中,上述的单元格可以是存储于一个单元格列表中,且该单元格列表中的所有单元格同样可以按照一个预定的顺序进行排列。The above-mentioned cells may be stored in a cell list, and all the cells in the cell list may also be arranged in a predetermined order.
在一个实现方式中,前述步骤S402的处理具体包括下述步骤S502的处理。In an implementation manner, the processing of the foregoing step S402 specifically includes the processing of the following step S502.
步骤S502,通过主线程对绘制后的图像进行渲染处理。Step S502: Perform rendering processing on the drawn image through the main thread.
对于本公开,当待加载图像对应的单元格移动到显示界面中时,即可以通过上述的主线程来对绘制后的图像进行渲染处理,从而得到渲染后的图像。For the present disclosure, when the cell corresponding to the image to be loaded is moved to the display interface, the drawn image can be rendered through the above-mentioned main thread to obtain the rendered image.
在一个实现方式中,当对待加载图像采用上述的实时加载方式时,则当待加载图像对应的单元格移动到显示界面中时,通过选择的异步线程对该待加载图像进行绘制,并将绘制得到的图像给到主线程,由主线程来对该绘制得到的图像进行渲染处理。In an implementation manner, when the image to be loaded adopts the above-mentioned real-time loading method, when the cell corresponding to the image to be loaded is moved to the display interface, the image to be loaded is drawn through the selected asynchronous thread, and the image is drawn. The obtained image is given to the main thread, and the main thread performs rendering processing on the drawn image.
在一个实现方式中,当对待加载图像采用上述的预加载方式时,则当待加载图像对应的单元格移动到显示界面中时,直接提取该待加载图像对应的绘制后的图像,并将绘制得到的图像给到主线程,由主线程来对该绘制得到的图像进行渲染处理。In one implementation, when the above-mentioned preloading method is used for the image to be loaded, when the cell corresponding to the image to be loaded is moved to the display interface, the drawn image corresponding to the image to be loaded is directly extracted, and the The obtained image is given to the main thread, and the main thread performs rendering processing on the drawn image.
在一个实现方式中,前述步骤S403的处理具体包括下述步骤S503的处理。In an implementation manner, the processing of the aforementioned step S403 specifically includes the processing of the following step S503.
步骤S503,通过显示界面显示渲染后的图像。Step S503: Display the rendered image through the display interface.
对于本公开,在由主线程对图像渲染后,将渲染后的图像给到UI界面上进行显示。For the present disclosure, after the image is rendered by the main thread, the rendered image is displayed on the UI interface.
其中,在本公开中,无论是上述的图像绘制过程,还是图像渲染过程,或者是图像的显示过程,均可以采用现有的对应的操作进行处理,故在本公 开的技术方案中不对具体的图像绘制过程、图像渲染过程以及图像显示过程做具体阐释。Among them, in the present disclosure, whether it is the above-mentioned image rendering process, image rendering process, or image display process, existing corresponding operations can be used for processing, so the technical solutions of the present disclosure do not deal with specific The image drawing process, image rendering process and image display process are explained in detail.
本公开中,基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示渲染后的图像。本公开提供的上述处理,实现了对图像的及时显示,通过分开进行图像的绘制与渲染处理,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验,并且通过异步线程的引入,提升了主线程的处理速度,进而有效提升了显示的流畅性。In this disclosure, the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface. The above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately drawing and rendering the image, avoids the occurrence of jams in the UI interface, and increases the user’s experience. The introduction of asynchronous threads improves the processing speed of the main thread, which effectively improves the fluency of the display.
本公开还提供了一种图像处理装置的结构示意图,如图6所示,本公开的图像处理装置60上创建有主线程,该装置60可以包括:绘制单元61、渲染单元62、显示单元63以及处理单元64,其中,The present disclosure also provides a schematic structural diagram of an image processing device. As shown in FIG. 6, a main thread is created on the image processing device 60 of the present disclosure. The device 60 may include: a drawing unit 61, a rendering unit 62, and a display unit 63. And a processing unit 64, in which,
绘制单元61,用于基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;The drawing unit 61 is configured to draw the image to be loaded based on the selected asynchronous thread to obtain the drawn image;
渲染单元62,用于通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;The rendering unit 62 is configured to perform rendering processing on the drawn image through the main thread to obtain the rendered image;
显示单元63,用于通过显示界面显示渲染后的图像。The display unit 63 is configured to display the rendered image through the display interface.
在一个实现方式中,异步线程存储于装置上创建的线程池中,In one implementation, asynchronous threads are stored in a thread pool created on the device,
绘制单元61,用于在线程池中选取任一异步线程;或,用于在线程池中按照预设顺序选取一个异步线程。The drawing unit 61 is used to select any asynchronous thread in the thread pool; or, used to select an asynchronous thread in the thread pool in a preset order.
在一个实现方式中,还包括:In one implementation, it also includes:
处理单元64,用于基于待加载图像对应的单元格与显示界面的对应关系,对待加载图像进行绘制;The processing unit 64 is configured to draw the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
待加载图像对应的单元格与显示界面的对应关系,包括如下任一项:The corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any of the following:
待加载图像对应的单元格处于显示界面中;The cell corresponding to the image to be loaded is in the display interface;
待加载图像对应的单元格为显示界面当前所显示的单元格相邻的预设个数的单元格。The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
在一个实现方式中,渲染单元62,用于当待加载图像对应的单元格移动到显示界面中时,通过主线程对绘制后的图像进行渲染处理,得到渲染后的图 像。In an implementation manner, the rendering unit 62 is configured to perform rendering processing on the drawn image through the main thread when the cell corresponding to the image to be loaded is moved to the display interface to obtain the rendered image.
本公开中,基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;通过主线程对绘制后的图像进行渲染处理,得到渲染后的图像;通过显示界面显示渲染后的图像。本公开提供的上述处理,实现了对图像的及时显示,通过分开进行图像的绘制与渲染处理,提高了处理效率,避免了UI界面中卡顿现象的发生,增加了用户的使用体验,并且通过异步线程的引入,提升了主线程的处理速度,进而有效提升了显示的流畅性。In this disclosure, the image to be loaded is drawn based on the selected asynchronous thread to obtain the drawn image; the drawn image is rendered by the main thread to obtain the rendered image; the rendered image is displayed through the display interface. The above-mentioned processing provided by the present disclosure realizes the timely display of the image, improves the processing efficiency by separately drawing and rendering the image, avoids the occurrence of jams in the UI interface, and increases the user’s experience. The introduction of asynchronous threads improves the processing speed of the main thread, which effectively improves the fluency of the display.
下面参考图7,其示出了适于实现本公开的实施例的电子设备(例如图1中的终端设备或服务器)700的结构示意图。本公开的实施例中的终端设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等的移动终端以及诸如数字TV、台式计算机等的固定终端。图7示出的电子设备仅仅是一个示例,不应对本公开的实施例的功能和使用范围带来任何限制。Referring now to FIG. 7, it shows a schematic structural diagram of an electronic device (for example, the terminal device or the server in FIG. 1) 700 suitable for implementing the embodiments of the present disclosure. Terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals ( For example, mobile terminals such as car navigation terminals and fixed terminals such as digital TVs and desktop computers. The electronic device shown in FIG. 7 is only an example, and should not bring any limitation to the function and scope of use of the embodiments of the present disclosure.
如图7所示,电子设备700可以包括处理装置(例如中央处理器、图形处理器等)701,其可以根据存储在只读存储器(ROM)702中的程序或者从存储装置708加载到随机访问存储器(RAM)703中的程序而执行各种适当的动作和处理。在RAM 703中,还存储有电子设备700操作所需的各种程序和数据。处理装置701、ROM 702以及RAM 703通过总线704彼此相连。输入/输出(I/O)接口705也连接至总线704。As shown in FIG. 7, the electronic device 700 may include a processing device (such as a central processing unit, a graphics processor, etc.) 701, which may be loaded into a random access device according to a program stored in a read-only memory (ROM) 702 or from a storage device 708. The program in the memory (RAM) 703 executes various appropriate actions and processing. In the RAM 703, various programs and data required for the operation of the electronic device 700 are also stored. The processing device 701, the ROM 702, and the RAM 703 are connected to each other through a bus 704. An input/output (I/O) interface 705 is also connected to the bus 704.
通常,以下装置可以连接至I/O接口705:包括例如触摸屏、触摸板、键盘、鼠标、摄像头、麦克风、加速度计、陀螺仪等的输入装置706;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置707;包括例如磁带、硬盘等的存储装置708;以及通信装置709。通信装置709可以允许电子设备700与其他设备进行无线或有线通信以交换数据。虽然图7示出了具有各种装置的电子设备700,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。Generally, the following devices can be connected to the I/O interface 705: including input devices 706 such as touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, liquid crystal display (LCD), speakers, vibration An output device 707 such as a device; a storage device 708 such as a magnetic tape and a hard disk; and a communication device 709. The communication device 709 may allow the electronic device 700 to perform wireless or wired communication with other devices to exchange data. Although FIG. 7 shows an electronic device 700 having various devices, it should be understood that it is not required to implement or have all the illustrated devices. It may alternatively be implemented or provided with more or fewer devices.
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置709从网络上被下载和安装,或者从存储装置708被安装,或者从ROM 702被安装。在该计算机程序被处理装置701执行时,执行本公开的实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以包括但不限于电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等,或者上述的任意合适的组合。It should be noted that the aforementioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium may include, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the above, for example. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program, and the program may be used by or in combination with an instruction execution system, apparatus, or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as a part of a carrier wave, and a computer-readable program code is carried therein. This propagated data signal can take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium. The computer-readable signal medium may send, propagate, or transmit the program for use by or in combination with the instruction execution system, apparatus, or device . The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
上述计算机可读介质可以包括在上述电子设备中;也可以单独存在,而未装配入该电子设备中。The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist alone without being assembled into the electronic device.
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程 序被该电子设备执行时,使得该电子设备:获取至少两个网际协议地址;向节点评价设备发送包括所述至少两个网际协议地址的节点评价请求,其中,所述节点评价设备从所述至少两个网际协议地址中,选取网际协议地址并返回;接收所述节点评价设备返回的网际协议地址;其中,所获取的网际协议地址指示内容分发网络中的边缘节点。The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains at least two Internet protocol addresses; and sends to the node evaluation device including the at least two A node evaluation request for an Internet Protocol address, wherein the node evaluation device selects an Internet Protocol address from the at least two Internet Protocol addresses and returns it; receives the Internet Protocol address returned by the node evaluation device; wherein, the obtained The Internet Protocol address indicates the edge node in the content distribution network.
或者,上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:接收包括至少两个网际协议地址的节点评价请求;从所述至少两个网际协议地址中,选取网际协议地址;返回选取出的网际协议地址;其中,接收到的网际协议地址指示内容分发网络中的边缘节点。Alternatively, the aforementioned computer-readable medium carries one or more programs, and when the aforementioned one or more programs are executed by the electronic device, the electronic device: receives a node evaluation request including at least two Internet Protocol addresses; Among the at least two Internet Protocol addresses, select the Internet Protocol address; return the selected Internet Protocol address; wherein, the received Internet Protocol address indicates the edge node in the content distribution network.
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言-诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言-诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)-连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。The computer program code used to perform the operations of the present disclosure may be written in one or more programming languages or a combination thereof. The above-mentioned programming languages include object-oriented programming languages-such as Java, Smalltalk, C++, and also conventional Procedural programming language-such as "C" language or similar programming language. The program code can be executed entirely on the user's computer, partly on the user's computer, executed as an independent software package, partly on the user's computer and partly executed on a remote computer, or entirely executed on the remote computer or server. In the case of a remote computer, the remote computer can be connected to the user’s computer through any kind of network including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (for example, using an Internet service provider to pass Internet connection).
附图中的流程图和框图,图示了按照本公开各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这由所涉及的功能决定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合, 可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions, and operations of the system, method, and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or part of code, and the module, program segment, or part of code contains one or more for realizing the specified logic function Executable instructions. It should also be noted that, in some alternative implementations, the functions marked in the block may also occur in a different order from the order marked in the drawings. For example, two blocks shown one after another can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and/or flowchart, and the combination of the blocks in the block diagram and/or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations Or it can be realized by a combination of dedicated hardware and computer instructions.
描述于本公开的实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。The units involved in the embodiments described in the present disclosure may be implemented in a software manner, and may also be implemented in a hardware manner. Wherein, the name of the unit does not constitute a limitation on the unit itself under certain circumstances. For example, the first obtaining unit can also be described as "a unit for obtaining at least two Internet Protocol addresses."
以上描述仅为本公开的较佳实施例以及对所运用技术原理的说明。本领域技术人员应当理解,本公开中所涉及的公开范围,并不限于上述技术特征的特定组合而成的技术方案,同时也应涵盖在不脱离上述公开构思的情况下,由上述技术特征或其等同特征进行任意组合而形成的其它技术方案。例如上述特征与本公开中公开的(但不限于)具有类似功能的技术特征进行互相替换而形成的技术方案。The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in this disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover the above technical features or technical solutions without departing from the above disclosed concept. Other technical solutions formed by any combination of its equivalent features. For example, the above-mentioned features and the technical features disclosed in the present disclosure (but not limited to) with similar functions are mutually replaced to form a technical solution.
本公开提供的电于设备,适用于上述方法的任一实施例,在此不再赘述。The electrical equipment provided in the present disclosure is applicable to any embodiment of the above method, and will not be repeated here.
本公开提供了一种计算机可读存储介质,该计算机可读存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机执行上述的弹幕处理方法或图像处理方法。The present disclosure provides a computer-readable storage medium for storing computer instructions, which when run on a computer, cause the computer to execute the above-mentioned barrage processing method or image processing method.
本公开提供的计算机可读存储介质,适用于上述方法的任一实施例,在此不再赘述。The computer-readable storage medium provided in the present disclosure is applicable to any embodiment of the above method, and will not be repeated here.
本技术领域技术人员可以理解,可以用计算机程序指令来实现这些结构图和/或框图和/或流图中的每个框以及这些结构图和/或框图和/或流图中的框的组合。本技术领域技术人员可以理解,可以将这些计算机程序指令提供给通用计算机、专业计算机或其他可编程数据处理方法的处理器来实现,从而通过计算机或其他可编程数据处理方法的处理器来执行本公开公开的结构图和/或框图和/或流图的框或多个框中指定的方案。Those skilled in the art can understand that computer program instructions can be used to implement each block in these structure diagrams and/or block diagrams and/or flow diagrams and combinations of blocks in these structure diagrams and/or block diagrams and/or flow diagrams. . Those skilled in the art can understand that these computer program instructions can be provided to processors of general-purpose computers, professional computers or other programmable data processing methods for implementation, so that the computer or other programmable data processing method processors can execute this Disclosure of the structure diagram and/or block diagram and/or flow diagram of the block or schemes specified in multiple blocks.
其中,本公开装置的各个模块可以集成于一体,也可以分离部署。上述模块可以合并为一个模块,也可以进一步拆分成多个子模块。Among them, the various modules of the device of the present disclosure can be integrated or deployed separately. The above modules can be combined into one module or further divided into multiple sub-modules.
本领域技术人员可以理解附图只是一个优选实施例的示意图,附图中的 模块或流程并不一定是实施本公开所必须的。Those skilled in the art can understand that the accompanying drawings are only schematic diagrams of preferred embodiments, and the modules or processes in the accompanying drawings are not necessarily necessary for implementing the present disclosure.
本领域技术人员可以理解实施例中的装置中的模块可以按照实施例描述进行分布于实施例的装置中,也可以进行相应变化位于不同于本实施例的一个或多个装置中。上述实施例的模块可以合并为一个模块,也可以进一步拆分成多个子模块。Those skilled in the art can understand that the modules in the device in the embodiment can be distributed in the device in the embodiment according to the description of the embodiment, or can be changed to be located in one or more devices different from this embodiment. The modules of the above-mentioned embodiments can be combined into one module, or further divided into multiple sub-modules.
上述本公开序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the present disclosure are only for description, and do not represent the advantages and disadvantages of the embodiments.
以上公开的仅为本公开的几个具体实施例,但是,本公开并非局限于此,任何本领域的技术人员能思之的变化都应落入本公开的保护范围。The above disclosure is only a few specific embodiments of the present disclosure, but the present disclosure is not limited thereto, and any changes that can be thought of by those skilled in the art should fall within the protection scope of the present disclosure.

Claims (20)

  1. 一种弹幕处理方法,应用于电子设备上,所述电子设备上创建有主线程以及异步线程,所述方法包括:A method for processing barrage is applied to an electronic device on which a main thread and an asynchronous thread are created, and the method includes:
    通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;Rasterize the barrage to be processed by the asynchronous thread to obtain an image;
    通过所述主线程对所述图像进行渲染处理,得到渲染后的图像;以及Performing rendering processing on the image by the main thread to obtain a rendered image; and
    通过显示界面显示所述渲染后的图像。The rendered image is displayed through the display interface.
  2. 如权利要求1所述的方法,其中,所述通过所述异步线程对待处理弹幕进行栅格化处理,得到图像,包括:The method according to claim 1, wherein said performing rasterization processing on the barrage to be processed by said asynchronous thread to obtain an image comprises:
    通过所述异步线程对所述待处理弹幕进行栅格化处理,将所述待处理弹幕的多个视图层级绘制成一个图像。Perform rasterization processing on the barrage to be processed by the asynchronous thread, and draw multiple view levels of the barrage to be processed into one image.
  3. 如权利要求1或2所述的方法,其中,所述通过所述异步线程对所述待处理弹幕进行栅格化处理,得到图像,包括:The method according to claim 1 or 2, wherein the rasterizing the to-be-processed barrage through the asynchronous thread to obtain an image comprises:
    通过所述异步线程选取预设的循环递归方法对所述待处理弹幕进行栅格化处理,得到图像。A preset loop recursive method is selected by the asynchronous thread to rasterize the to-be-processed barrage to obtain an image.
  4. 如权利要求1-3中任一项所述的方法,其中,所述异步线程存储于所述电子设备上创建的线程池中,The method according to any one of claims 1 to 3, wherein the asynchronous thread is stored in a thread pool created on the electronic device,
    所述异步线程的选取,包括如下任一项:The selection of the asynchronous thread includes any one of the following:
    在所述线程池中选取任一空闲的异步线程;Select any idle asynchronous thread in the thread pool;
    在所述线程池中按照预设顺序选取一个空闲的异步线程。An idle asynchronous thread is selected in the thread pool according to a preset order.
  5. 一种弹幕处理装置,所述装置上创建有主线程以及异步线程,所述装置包括:A barrage processing device, a main thread and an asynchronous thread are created on the device, and the device includes:
    处理单元,用于通过所述异步线程对待处理弹幕进行栅格化处理,得到图像;The processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread to obtain an image;
    渲染单元,用于通过所述主线程对所述图像进行渲染处理,得到渲染后的图像;以及A rendering unit, configured to perform rendering processing on the image through the main thread to obtain a rendered image; and
    显示单元,用于通过显示界面显示所述渲染后的图像。The display unit is configured to display the rendered image through a display interface.
  6. 如权利要求5所述的装置,其中,所述处理单元,用于通过所述异步线程对所述待处理弹幕进行栅格化处理,将所述待处理弹幕的多个视图层级绘制成一个图像。7. The device of claim 5, wherein the processing unit is configured to perform rasterization processing on the barrage to be processed through the asynchronous thread, and to render the multiple view levels of the barrage to be processed into An image.
  7. 如权利要求5或6所述的装置,其中,所述处理单元,用于通过所述异步线程选取预设的循环递归方法对所述待处理弹幕进行栅格化处理,得到图像。8. The device of claim 5 or 6, wherein the processing unit is configured to select a preset loop recursive method through the asynchronous thread to rasterize the barrage to be processed to obtain an image.
  8. 如权利要求5-7中任一项所述的装置,其中,所述异步线程存储于所述装置上创建的线程池中,7. The device according to any one of claims 5-7, wherein the asynchronous thread is stored in a thread pool created on the device,
    所述处理单元,用于在所述线程池中选取任一空闲的异步线程;或,用于在所述线程池中按照预设顺序选取一个空闲的异步线程。The processing unit is used to select any idle asynchronous thread in the thread pool; or, used to select an idle asynchronous thread in the thread pool in a preset order.
  9. 一种电子设备,包括:处理器和存储器;An electronic device, including: a processor and a memory;
    所述存储器,用于存储操作指令;The memory is used to store operation instructions;
    所述处理器,用于通过调用所述操作指令,执行上述权利要求1至权利要求4中任一项所述的弹幕处理方法。The processor is configured to execute the barrage processing method according to any one of claims 1 to 4 by calling the operation instructions.
  10. 一种计算机可读存储介质,所述计算机存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机执行上述权利要求1至权利要求4中任一项所述的弹幕处理方法。A computer-readable storage medium for storing computer instructions, which when running on a computer, causes the computer to execute the barrage processing method according to any one of claims 1 to 4.
  11. 一种图像处理方法,应用于业务设备上,所述业务设备上创建有主线 程,所述方法包括:An image processing method applied to a business device on which a main thread is created, and the method includes:
    基于选取的异步线程对待加载图像进行绘制,得到绘制后的图像;Draw the image to be loaded based on the selected asynchronous thread, and get the drawn image;
    通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;Performing rendering processing on the drawn image by the main thread to obtain a rendered image;
    通过显示界面显示所述渲染后的图像。The rendered image is displayed through the display interface.
  12. 如权利要求11所述的方法,其中,所述异步线程存储于所述业务设备上创建的线程池中,The method according to claim 11, wherein the asynchronous thread is stored in a thread pool created on the service device,
    所述选取异步线程,包括如下任一项:The selection of asynchronous threads includes any of the following:
    在所述线程池中选取任一异步线程;Select any asynchronous thread in the thread pool;
    在所述线程池中按照预设顺序选取一个异步线程。An asynchronous thread is selected in the thread pool according to a preset sequence.
  13. 如权利要求11或12所述的方法,其中,所述对待加载图像进行绘制的触发处理,包括:The method according to claim 11 or 12, wherein the triggering process of drawing the image to be loaded includes:
    基于所述待加载图像对应的单元格与所述显示界面的对应关系,对所述待加载图像进行绘制;Drawing the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
    所述待加载图像对应的单元格与显示界面的对应关系,包括如下任一项:The corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
    所述待加载图像对应的单元格处于所述显示界面中;The cell corresponding to the image to be loaded is in the display interface;
    所述待加载图像对应的单元格为所述显示界面当前所显示的单元格相邻的预设个数的单元格。The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  14. 如权利要求13所述的方法,其中,所述通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像,包括:The method according to claim 13, wherein said performing rendering processing on said drawn image by said main thread to obtain a rendered image comprises:
    当所述待加载图像对应的单元格移动到所述显示界面中时,通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像。When the cell corresponding to the image to be loaded is moved to the display interface, the drawn image is rendered by the main thread to obtain the rendered image.
  15. 一种图像处理装置,所述装置上创建有主线程,所述装置包括:An image processing device, a main thread is created on the device, and the device includes:
    绘制单元,用于基于选取的异步线程对待加载图像进行绘制,得到绘制后 的图像;The drawing unit is used to draw the image to be loaded based on the selected asynchronous thread to obtain the drawn image;
    渲染单元,用于通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像;A rendering unit, configured to perform rendering processing on the drawn image through the main thread to obtain a rendered image;
    显示单元,用于通过显示界面显示所述渲染后的图像。The display unit is configured to display the rendered image through a display interface.
  16. 如权利要求15所述的装置,其中,所述异步线程存储于所述装置上创建的线程池中,The device of claim 15, wherein the asynchronous thread is stored in a thread pool created on the device,
    所述绘制单元,用于在所述线程池中选取任一异步线程;或,用于在所述线程池中按照预设顺序选取一个异步线程。The drawing unit is used to select any asynchronous thread in the thread pool; or, to select an asynchronous thread in the thread pool in a preset order.
  17. 如权利要求15或16所述的装置,其中,还包括:The device according to claim 15 or 16, further comprising:
    处理单元,用于基于所述待加载图像对应的单元格与显示界面的对应关系,对所述待加载图像进行绘制;A processing unit, configured to draw the image to be loaded based on the correspondence between the cell corresponding to the image to be loaded and the display interface;
    所述待加载图像对应的单元格与显示界面的对应关系,包括如下任一项:The corresponding relationship between the cell corresponding to the image to be loaded and the display interface includes any one of the following:
    所述待加载图像对应的单元格处于所述显示界面中;The cell corresponding to the image to be loaded is in the display interface;
    所述待加载图像对应的单元格为所述显示界面当前所显示的单元格相邻的预设个数的单元格。The cell corresponding to the image to be loaded is a preset number of cells adjacent to the cell currently displayed on the display interface.
  18. 如权利要求17所述的装置,其中,所述渲染单元,用于当所述待加载图像对应的单元格移动到所述显示界面中时,通过所述主线程对所述绘制后的图像进行渲染处理,得到渲染后的图像。The device according to claim 17, wherein the rendering unit is configured to perform processing on the drawn image through the main thread when the cell corresponding to the image to be loaded is moved to the display interface. Rendering process to get the rendered image.
  19. 一种电子设备,其中,包括:处理器和存储器;An electronic device, including: a processor and a memory;
    所述存储器,用于存储操作指令;The memory is used to store operation instructions;
    所述处理器,用于通过调用所述操作指令,执行上述权利要求11至权利要求14中任一项所述的图像处理方法。The processor is configured to execute the image processing method according to any one of claims 11 to 14 by calling the operating instructions.
  20. 一种计算机可读存储介质,所述计算机存储介质用于存储计算机指令,当其在计算机上运行时,使得计算机执行上述权利要求11至权利要求14中任一项所述的图像处理方法。A computer-readable storage medium for storing computer instructions, which when running on a computer, causes the computer to execute the image processing method according to any one of claims 11 to 14.
PCT/CN2020/070315 2019-01-31 2020-01-03 View processing method and apparatus, and electronic device and computer-readable storage medium, and image processing method and apparatus, and electronic device and computer-readable storage medium WO2020156035A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201910099987.XA CN109788334A (en) 2019-01-31 2019-01-31 Barrage processing method, device, electronic equipment and computer readable storage medium
CN201910099986.5A CN109801210A (en) 2019-01-31 2019-01-31 Image processing method, device, electronic equipment and computer readable storage medium
CN201910099986.5 2019-01-31
CN201910099987.X 2019-01-31

Publications (1)

Publication Number Publication Date
WO2020156035A1 true WO2020156035A1 (en) 2020-08-06

Family

ID=71840805

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/070315 WO2020156035A1 (en) 2019-01-31 2020-01-03 View processing method and apparatus, and electronic device and computer-readable storage medium, and image processing method and apparatus, and electronic device and computer-readable storage medium

Country Status (1)

Country Link
WO (1) WO2020156035A1 (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120321281A1 (en) * 2011-06-17 2012-12-20 Exclaim Mobility, Inc. Systems and Methods for Recording Content within Digital Video
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN106792225A (en) * 2016-11-09 2017-05-31 武汉斗鱼网络科技有限公司 front end barrage control method and device
CN107135427A (en) * 2017-03-28 2017-09-05 武汉斗鱼网络科技有限公司 A kind of method and system for showing barrage information
CN107729094A (en) * 2017-08-29 2018-02-23 口碑(上海)信息技术有限公司 The method and device that a kind of user interface renders
CN107770563A (en) * 2017-10-10 2018-03-06 武汉斗鱼网络科技有限公司 A kind of barrage message treatment method and device
CN109788334A (en) * 2019-01-31 2019-05-21 北京字节跳动网络技术有限公司 Barrage processing method, device, electronic equipment and computer readable storage medium
CN109801210A (en) * 2019-01-31 2019-05-24 北京字节跳动网络技术有限公司 Image processing method, device, electronic equipment and computer readable storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120321281A1 (en) * 2011-06-17 2012-12-20 Exclaim Mobility, Inc. Systems and Methods for Recording Content within Digital Video
CN105872679A (en) * 2015-12-31 2016-08-17 乐视网信息技术(北京)股份有限公司 Barrage display method and device
CN106792225A (en) * 2016-11-09 2017-05-31 武汉斗鱼网络科技有限公司 front end barrage control method and device
CN107135427A (en) * 2017-03-28 2017-09-05 武汉斗鱼网络科技有限公司 A kind of method and system for showing barrage information
CN107729094A (en) * 2017-08-29 2018-02-23 口碑(上海)信息技术有限公司 The method and device that a kind of user interface renders
CN107770563A (en) * 2017-10-10 2018-03-06 武汉斗鱼网络科技有限公司 A kind of barrage message treatment method and device
CN109788334A (en) * 2019-01-31 2019-05-21 北京字节跳动网络技术有限公司 Barrage processing method, device, electronic equipment and computer readable storage medium
CN109801210A (en) * 2019-01-31 2019-05-24 北京字节跳动网络技术有限公司 Image processing method, device, electronic equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN109640188B (en) Video preview method and device, electronic equipment and computer readable storage medium
US9841998B2 (en) Processor power optimization with response time assurance
EP3040804B1 (en) Electronic device for controlling power and method therefor
WO2020133373A1 (en) Video processing method, apparatus, and electronic device, and computer readable storage medium
US9177009B2 (en) Generation based update system
US10635505B2 (en) Automated batch application programming interfaces
WO2020200173A1 (en) Document input content processing method and apparatus, electronic device, and storage medium
US20220394333A1 (en) Video processing method and apparatus, storage medium, and electronic device
JP2023550334A (en) Live streaming screen display method and equipment
US9021383B2 (en) Browsing between mobile and non-mobile web sites
CN110851276A (en) Service request processing method, device, server and storage medium
CN111258736A (en) Information processing method and device and electronic equipment
US20230385080A1 (en) Method and apparatus for presenting information on lock screen interface, terminal, and storage medium
CN111158820A (en) Control click event processing method and device, electronic equipment and storage medium
WO2020239082A1 (en) Information displaying method and apparatus, and storage medium
WO2020192246A1 (en) Display control method and apparatus for terminal interface, storage medium and electronic device
US20230276079A1 (en) Live streaming room page jump method and apparatus, live streaming room page return method and apparatus, and electronic device
WO2020156035A1 (en) View processing method and apparatus, and electronic device and computer-readable storage medium, and image processing method and apparatus, and electronic device and computer-readable storage medium
CN109951737B (en) Video processing method, video processing device, electronic equipment and computer-readable storage medium
US11765108B2 (en) Method, computer device, and non-transitory computer readable recording medium to display grouped image message
WO2023098012A1 (en) Bullet comment display method and apparatus
CN116048371A (en) Page component switching method, device, equipment, medium and product in application program
US11366613B2 (en) Method and apparatus for writing data
WO2021068964A1 (en) Window arrangement method and device, terminal and storage medium
CN115775290A (en) Animation frame rate processing method, device, equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20749245

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.12.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 20749245

Country of ref document: EP

Kind code of ref document: A1