Element processing method and apparatus, electronic device, and storage medium
By optimizing the processing order and display method of elements in the element queue and data layer, the poor display effect when multiple elements are displayed on the screen at the same time is solved, and dynamic processing of elements and rich display effects are achieved.
Patent Information
- Application Number
- PCT/CN2024/135844
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-10
- Filing Date
- 2024-11-29
- Publication Date
- 2025-07-17
AI Technical Summary
In the prior art, the display method of elements is monotonous, especially when multiple elements are displayed on the screen at the same time, the screen display space and time are limited, resulting in poor display effect.
Responding to the element addition request, obtain the elements to be added, add them to the element queue one by one in the preset order of addition, determine the target child elements, and write them into the data layer, and finally display them on the screen, using the element queue and data layer to optimize the processing order and display method of elements.
It effectively solves the problem of limited space and time for element display, enriches the display method, and ensures the data stability of the target child elements and the screen display effect.
Smart Images

Figure CN2024135844_17072025_PF_FP_ABST
Abstract
Description
Element processing method, device, electronic device and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202410040080.7, filed on January 10, 2024, entitled “Element processing method, device, electronic device and storage medium”. The entire contents of that application are incorporated herein by reference. Technical Field
[0003] The embodiments of the present disclosure relate to computer application technology, and more particularly to an element processing method, device, electronic device, and storage medium. Background Art
[0004] With the continuous development of computer vision technology, more and more elements are displayed in a visual way, and the display effects of elements are becoming more and more diverse.
[0005] In order to enrich the display effect of elements, related technologies generally adopt a method of empowering the display mode of elements, for example, changing the display style or display style of elements or adding animation parameters to elements.
[0006] However, the display methods of elements in related technologies are often limited to zooming in or out, resulting in a relatively monotonous display. Especially in scenarios where multiple elements are displayed on the screen at the same time, the display effect of multiple elements is poor due to the relatively limited display space and display time of the screen. Summary of the Invention
[0007] Embodiments of the present disclosure provide an element processing method, device, electronic device, and storage medium.
[0008] In a first aspect, an embodiment of the present disclosure provides an element processing method, the method comprising:
[0009] In response to an element adding request, obtain the elements to be added, and add the elements to the element queue one by one according to a preset adding order;
[0010] Taking out the elements from the element queue in sequence according to the preset adding order, determining the target sub-element corresponding to the taken-out element, and writing the target sub-element into the data layer;
[0011] The target sub-element written in the data layer is displayed on the screen.
[0012] In a second aspect, an embodiment of the present disclosure further provides an element processing device, the device comprising:
[0013] An element adding module is used to obtain the elements to be added in response to the element adding request, and add the elements to the element queue one by one according to the preset adding order;
[0014] a sub-element extraction module, configured to sequentially extract the elements from the element queue according to the preset adding order, determine a target sub-element corresponding to the extracted element, and write the target sub-element into the data layer;
[0015] An on-screen display module is used to display the target sub-element written in the data layer on the screen.
[0016] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0017] one or more processors;
[0018] a storage device for storing one or more programs,
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the element processing method as described in any one of the embodiments of the present disclosure.
[0020] In a fourth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to execute the element processing method as described in any one of the embodiments of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.
[0022] FIG1A is a schematic flow chart of an element processing method provided by an embodiment of the present disclosure;
[0023] FIG1B is a schematic diagram of an element addition process of an element processing method provided in an embodiment of the present disclosure that can be used in an embodiment of the present disclosure;
[0024] FIG2A is a schematic flow chart of another element processing method provided by an embodiment of the present disclosure;
[0025] FIG2B is a flow chart of an optional example of another element processing method provided by an embodiment of the present disclosure;
[0026] FIG2C is a schematic diagram of an element rendering process that can be used in an element processing method according to an embodiment of the present disclosure;
[0027] FIG3A is a schematic structural diagram of another element processing device provided by an embodiment of the present disclosure;
[0028] FIG3B is a schematic diagram of an element deletion process provided by an embodiment of the present disclosure and applicable to an embodiment of the present disclosure;
[0029] FIG4 is a schematic structural diagram of an element processing device provided by an embodiment of the present disclosure;
[0030] FIG5 is a schematic structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.
[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0033] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.
[0034] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".
[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0037] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0038] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0039] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0040] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0041] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.
[0042] Figure 1A is a flow chart of an element processing method provided by an embodiment of the present disclosure. The present disclosure embodiment is applicable to the case where elements are displayed on the screen, and is particularly applicable to the case where multiple elements are displayed on the screen. The method can be executed by an element processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC, or a server. As shown in Figure 1A, the method of this embodiment may specifically include:
[0043] S110 , in response to an element adding request, obtaining elements to be added, and adding the elements to the element queue one by one according to a preset adding order.
[0044] The element addition request can be understood as initiating a request to display the sub-elements corresponding to the element on the screen. Specifically, the element addition request may carry the element to be added and / or the element identifier corresponding to the element. The element identifier can be an identifier used to distinguish the element from other elements, for example, a Universally Unique Identifier (UUID). The element addition request can be generated based on an element addition operation. Exemplarily, the element addition operation can be based on at least one of an element upload operation, an element import operation, and an element capture operation. The element addition request can also be generated based on a preset trigger event. Exemplarily, the preset trigger event can be a preset time trigger event and / or a preset content trigger event, such as receiving an element of a preset type from a target end. An element can be understood as an object to be processed. There can be one or more elements to be added. The elements can be of various types, for example, media content, specifically one or more of images, text, audio, and video. The preset addition order can be understood as the pre-set order in which elements are added to the element queue, or in other words, the order in which the elements are processed. Exemplarily, the element addition order can be determined based on the element addition time and / or the element's preset priority.
[0045] In the disclosed embodiment, the element queue is used to add the element identifier corresponding to the element to be generated as the target sub-element, and the arrangement order of the element identifier in the element queue indicates the processing order of the element. Because when multiple elements generate sub-elements, different elements will have a certain delay in time, so a queue of elements to be processed is set to quickly add and delete elements to be processed. Moreover, when an element generates a sub-element, there is a certain time delay in the processing of other elements, so it is necessary to continuously record the elements to be processed through the element queue. In short, the element queue is used to maintain the sequence of our current elements to be processed. Moreover, the arrangement position of the element identifier in the sequence determines the processing order of the element.
[0046] Optionally, adding the elements to the element queue one by one in a preset addition order includes: for each element, determining an element processing state corresponding to the element, determining an element to be added to the element queue based on the element processing state, and adding the elements to be added to the element queue to the element queue one by one in a preset addition order. The element processing state includes one or more states of existing in the element queue, determining a target sub-element, and being displayed on the screen.
[0047] Exemplarily, based on the element processing status, the elements to be added to the element queue are determined, and the elements to be added to the element queue are added to the element queue one by one according to a preset adding order, including at least one of the following operations: when the element processing status is that the target sub-element is being determined or has been displayed on the screen, continue to perform the operation of determining one or more target sub-elements corresponding to the element being taken out, and ignore the element addition request of the element; when the element processing status is that the element exists in the element queue, delete the element identifier of the element from the element queue, and add the element identifier to the end of the element queue. The above technical solution can effectively prevent the repeated execution of on-screen processing for the newly added elements, thereby avoiding wasting performance.
[0048] FIG1B is a schematic diagram of an element addition process for an element processing method that can be used in an embodiment of the present disclosure. Exemplarily, as shown in FIG1B , when a new element to be added is added, the operations performed primarily involve maintaining the data structure associated with the element queue. This does not interfere with the sub-element rendering core's determination of the target sub-element corresponding to the removed element, nor does it directly notify the rendering layer to perform on-screen rendering. Specifically, upon receiving an element supply receive event, i.e., upon obtaining one or more elements to be added, the element identifier of each element is obtained. Then, based on the element identifier of each element, the element is determined, one by one, in the order in which the elements were added, to determine whether the element is being processed by the sub-element rendering core, i.e., whether the operation of determining the target sub-element corresponding to the removed element is being performed. If the element is being processed, the element addition event is ignored. If the element is not being processed by the element rendering core, but is present in the element queue, all entries in the element queue with the same element identifier as the element are deleted, and the element with the element identifier is then added to the end of the element queue. If the element is not being processed by the element rendering core and its element identifier does not exist in the element queue, the element identifier of the element is directly added to the end of the element queue. Among them, the element rendering core is responsible for processing the element to be added as the target child element.
[0049] S120 , taking the elements out of the element queue in sequence according to the preset adding order, determining a target sub-element corresponding to the taken-out element, and writing the target sub-element into the data layer.
[0050] In an embodiment of the present disclosure, the target sub-element corresponding to an element may be information associated with the element. Exemplarily, the target sub-element may be used to indicate at least part of the content in the element and / or to indicate descriptive information of the element. Exemplarily, the target sub-element may be an object of the target type in the element, such as, in a character image, the target sub-element may be a face or hand in the image, etc.; in a landscape image, the target sub-element may be a preset type of building or plant, etc. The target sub-element may also be key information in the element and other information associated with the key information, such as, in a text-type element, the target sub-element may be a keyword of the text and a descriptive word similar to the keyword, etc. The data layer is used to maintain (record and store) the rendering data of the target sub-element on the upper screen.
[0051] As mentioned above, in order to save performance, the maximum number of target sub-elements that can be on the screen is set. However, the maximum number of sub-elements that can be on the screen is the same as the number of storage locations. Therefore, when the elements are taken out from the element queue in sequence according to the preset addition order, it is possible to first detect whether the data layer has unoccupied storage locations. Specifically, when there are unoccupied storage locations in the data layer, the elements to be processed are taken out from the element queue in accordance with the preset addition order. If there are no unoccupied storage locations in the data layer, that is, all storage locations are occupied, it means that the number of target sub-elements that can be on the screen has reached the upper limit, and the sub-elements of subsequent elements can no longer be rendered on the screen. Then the elements to be processed can be temporarily stopped from being taken out from the element queue to avoid performance loss.
[0052] Optionally, the data layer includes a preset number of storage locations. In an embodiment of the present disclosure, the number of storage locations in the data layer is the same as the maximum number of target sub-elements that can be displayed on the screen at the same time. That is, the preset number can be a pre-set maximum number of target sub-elements that can be displayed on the screen at the same time. Considering that the memory space of the electronic device that executes the element processing method is limited, in order to optimize the memory, all data to be displayed on the screen can share a memory space at the bottom layer. For example, the data layer can support up to k sub-elements to be rendered on the screen at the same time, then the bottom layer memory can only open up k storage locations for storing the target sub-elements on the screen. Furthermore, each storage location in the data layer is set with a key and a location identifier. The reason for setting the location identifier is that since k storage locations are opened, when adding and deleting target sub-elements, the order of the target sub-elements stored in the array corresponding to the data layer may be disordered. In order to ensure that the order in which they are rendered on the screen is correct, the location identifier is set for marking.
[0053] Exemplarily, the key is used to record at least the element identifier of the element corresponding to each target sub-element rendered on the screen or stored in the data layer. Furthermore, the key can also be used to record animation-related parameters of the target sub-element.
[0054] Optionally, writing the target sub-element into the data layer includes: writing the target sub-element into the storage location one by one based on a flag bit corresponding to each target sub-element, wherein one target sub-element is written into each storage location. The flag bit may be used to indicate whether the storage location is occupied. Specifically, different characters may be pre-set for the flag bit to represent different occupancy states.
[0055] Specifically, when there are newly added sub-elements to be added to the data layer, the following operations can be performed: traverse the storage locations in the data layer, and determine the occupancy status of the storage locations based on the flag bits corresponding to each of the target sub-elements in the data layer. When it is detected that the character of the flag bit indicates that the target location is unoccupied, write the newly added target sub-element to the target location corresponding to the flag bit. After all the storage locations in the data layer are filled, or after all the newly added target sub-elements are filled, stop processing the elements and writing the target sub-elements. The use of this technical solution can effectively ensure that the target sub-elements are successfully written into the data layer.
[0056] Specifically, determining the target sub-element corresponding to the extracted element includes: scaling the extracted element to a preset size in proportion to a preset ratio, and extracting the initial sub-element in the scaled element; when the initial sub-element meets a preset screening condition, using the initial sub-element as the sub-element to be extracted; obtaining the projection transformation matrix used when extracting the sub-element to be extracted, and using the projection transformation matrix to extract the target sub-element from the element.
[0057] Among them, the projection transformation matrix can specifically include the Model matrix (model matrix), the View matrix (observation matrix) and the Projection matrix (projection matrix). Among them, the Model matrix is used to define the position, rotation and scaling of the model in the model coordinate system. The View matrix is used to define the position and direction of the observer in the world coordinate system. The Projection matrix is used to define the type and range of the projection in the projection coordinate system. The elements can be transformed into the normalized space through the projection transformation matrix. Because it is a geometric scaling, the description of MVP is a description in the normalized space (all [-1,1]), so there is no need to consider the absolute value of the width and height of the element, only the aspect ratio of the element is considered.
[0058] In the embodiment of the present disclosure, because the elements to be processed may often be large in size, the problems of computing space occupancy and processing efficiency are solved by scaling the elements. Taking the element to be processed as a picture as an example, it can be first scaled to a texture with the longest side being a preset value in the form of geometric scaling by aligning the longest side, and then the element is processed by the preset algorithm of the image processor to obtain a plurality of sub-elements, and then these sub-elements are screened according to the preset screening conditions. And the projection transformation matrix used to process the scaled elements is recorded. Since the elements are scaled proportionally according to the preset ratio, the projection transformation matrix can be reused to extract the target sub-element in the original element. By using the projection transformation matrix to extract the target sub-element from the element, the loss of the acquired target sub-element can be reduced, while improving the computing efficiency, the processing result of the target sub-element is guaranteed, thereby ensuring its on-screen effect.
[0059] In an embodiment of the present disclosure, when the total number of the target sub-elements to be displayed on the screen changes, the display information of the target sub-elements on the screen can be updated in a preset manner. Optionally, after the target sub-elements are written into the data layer, it indicates that target sub-elements that need to be displayed on the screen have been added. At this time, the display information of the target sub-elements on the screen can be updated in a preset manner for the target sub-elements that have been displayed on the screen to increase the on-screen display of the new target sub-elements. Alternatively, after the target sub-element corresponding to the element is deleted from the data layer, it indicates that the target sub-elements displayed on the screen have decreased. At this time, the display information of the target sub-element on the screen can also be updated in a preset manner for the target sub-element that has been displayed on the screen.
[0060] The display information may be understood as information for displaying the target sub-element on the screen. For example, the display information may include display position and / or display size. The preset mode may be a pre-set on-screen display mode for one or more target sub-elements. For example, when multiple target sub-elements are displayed on the screen, the display information for different target sub-elements on the screen may be the same or different.
[0061] For example, the target sub-elements that have been displayed on the screen are sub-element 1, sub-element 2, sub-element 3, sub-element 4, sub-element 5 and sub-element 6. In the process of canceling the on-screen display of sub-element 2 and sub-element 3 or after canceling the on-screen display of sub-element 2 and sub-element 3, sub-element 4, sub-element 5 and sub-element 6 can be moved in sequence, and sub-element 4 and sub-element 5 can be moved to the display positions of sub-element 2 and sub-element 3 for display, and sub-element 6 can be moved to the display position of sub-element 4 for display. Alternatively, sub-element 1, sub-element 4, sub-element 5 and sub-element 6 are moved to the middle four display positions for display. Alternatively, the display information of one or more target sub-elements among sub-element 1, sub-element 4, sub-element 5 and sub-element 6 is adjusted according to the preset layout corresponding to the number of target sub-elements displayed on the screen. The display information includes
[0062] Optionally, after the target sub-element is written into the data layer, the method further includes: in the case where there are multiple target sub-elements, updating the rendering order corresponding to the target sub-elements according to the writing order of the target sub-elements in the data layer. Specifically, updating the rendering order corresponding to the target sub-elements according to the processing order of the storage locations where the target sub-elements are written in the data layer. Each storage location can be associated with a rendering entity of an engine. In the embodiment of the present disclosure, the processing order of the target sub-elements written into each storage location can be determined according to the occupancy status (occupied or unoccupied) and the occupied time of each storage location in the data layer, and then, the rendering order of the target location can be updated according to the processing order.
[0063] For example, a data layer has five storage locations, each labeled 0-4 from front to back. Occupied storage locations have a flag set to True, while unoccupied locations have a flag set to False. Their rendering order, from front to back, is represented by 1-5. Initially, the storage locations are processed in the order 0, 1, 2, 3, 4, and 5, with their flags all set to False. The corresponding rendering order is 0, 1, 2, 3, 4, and 5. Suppose that the target sub-element is written to storage locations 0-3, in that order. The flags for storage locations 0, 1, 2, 3, 4, and 5 are True, True, True, True, False, and False, respectively. If the target sub-element in storage locations 1 and 2 is deleted, the processing order of the storage locations is adjusted to 0, 3, 4, 5, 1, and 2. The rendering order is then updated according to the processing order. After the update, the rendering order for storage locations 0, 3, 4, 5, 1, and 2 is 0, 1, 2, 3, 4, and 5, respectively. The larger the rendering order, the later the rendering time. The advantage of this setting is that it can ensure that the target sub-element that is first displayed on the screen is displayed at the top layer.
[0064] Simply put, each storage location in the data layer corresponds to a unique rendering entity in the engine. However, deleting the target child elements mentioned above may cause the rendering order to be misplaced. For example, in the example above: 0,1,2,3,4,5 -> 0,3,4,5,1,2, we need to refresh the render order properties of entities 0,3,4,5,1,2 to 0,1,2,3,4,5.
[0065] S130: Display the target sub-element written in the data layer on the screen.
[0066] In the disclosed embodiment, the target sub-element written in the data layer can be displayed on the screen to achieve real-time on-screen update of the target sub-element. In order to avoid flickering of the target sub-element and achieve a smooth transition of the display effect, the target sub-element written in the data layer can be rendered on the screen through the rendering layer.
[0067] The technical solution of the embodiment of the present disclosure first obtains the elements to be added by responding to the element adding request, supports the customized addition of elements, and thus realizes the dynamic processing of the elements; then adds the elements to the element queue one by one according to the preset adding order, and then takes the elements out of the element queue in sequence according to the preset adding order, that is, the elements to be added can be processed according to the preset adding order through the element queue to obtain the target sub-elements corresponding to the elements in sequence; finally, writes the target sub-element into the data layer, and then displays the target sub-element written in the data layer on the screen, which effectively solves the technical problems of limited display space and time of elements and monotonous display method in related technologies, and can effectively ensure the stability of the data of the target sub-element, thereby ensuring the on-screen display effect of the target sub-element.
[0068] Figure 2A is a flow chart of another element processing method provided by an embodiment of the present disclosure. The technical solution of this embodiment refines the way in which sub-elements are displayed on the screen on the basis of the above-mentioned embodiment. Optionally, the target sub-element written in the data layer is displayed on the screen, including: determining the target sub-element added to the data layer through the rendering layer, and rendering the target sub-element added to the data layer on the screen according to preset animation parameters and animation-related parameters. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to those of the aforementioned embodiments are not repeated here. As shown in Figure 2A, the method of this embodiment may specifically include:
[0069] S210 . In response to an element adding request, obtain elements to be added, and add the elements to an element queue one by one according to a preset adding order.
[0070] S220 , taking the elements out of the element queue in sequence according to the preset adding order, determining a target sub-element corresponding to the taken-out element, and writing the target sub-element into the data layer.
[0071] S230: Determine the target sub-element added in the data layer through a rendering layer, and render the target sub-element added in the data layer onto the screen according to preset animation parameters and animation-related parameters.
[0072] Among them, the preset animation parameters can be understood as animation control parameters used to control the preset animation effect presented by the target sub-element on the screen. The animation control parameters can be used to control the movement speed, movement trajectory, movement time, movement position and change mode of displayed information of the target sub-element. The animation-related parameters can be understood as parameters associated with the animation effect presented by the target sub-element on the screen. Exemplarily, the animation-related parameters include at least one of the position information, size information and transparency information of the target sub-element.
[0073] Specifically, rendering the target sub-element onto the screen may include: respectively determining a rendering entity corresponding to each of the target sub-elements in the rendering layer, assigning the target sub-element to the rendering entity, so as to render the target sub-element onto the screen, wherein the rendering entity includes a preset rendering model and a preset rendering material corresponding to the preset rendering model.
[0074] Specifically, determining the target sub-element added to the data layer through the rendering layer includes: obtaining rendered information and information to be rendered through the rendering layer, and determining the target sub-element added to the data layer based on the rendered information and the information to be rendered. The rendered information is used to indicate the target sub-element written to the data layer during the last rendering, and the information to be rendered is used to indicate the target sub-element written to the data layer at the current moment. The added target sub-element can be understood as a target sub-element that needs to be displayed on the screen.
[0075] In the disclosed embodiment, the target sub-elements of the data layer to be deleted and the display information to be transformed can also be determined based on the rendered information and the information to be rendered. The target sub-elements of the transformed display information can be understood as target sub-elements that are already displayed on the screen but require transformation of the display information. For target sub-elements to be deleted, added, and transformed, a slow-motion animation can be organized to write the information of the target sub-elements with a flag set to True in the data layer into the rendered information for use in the next judgment.
[0076] For each target sub-element whose display information is transformed, the current animation of the target sub-element is interrupted, and the animation-related parameters such as the current position, size and transparency of the target sub-element are recorded; its current animation-related parameters are used as the starting value, and the set value corresponding to the target change information corresponding to the target sub-element displayed on the upper screen is used as the ending value, to create a slow-motion animation and play the slow-motion (smooth transition) animation.
[0077] As shown in Figure 2B, the element to be processed is taken out from the element queue and passed through the element rendering core (the processing core of the sub-element) to obtain the sub-element processing result of the element, that is, the target sub-element of the element. Then, there is an unoccupied storage location in the data layer, and the target sub-element is written to the data layer. The rendering layer is notified that a rendering operation needs to be performed. At this time, the rendering layer automatically identifies the data changes in the data layer, generates a slow-motion animation corresponding to the change method, and plays the slow-motion animation to achieve on-screen rendering of the target sub-element.
[0078] In this alternative implementation, the rendering layer doesn't proactively identify changes to the data layer. Instead, it notifies the rendering layer when a new target sub-element is written to the data layer and the data layer has indeed changed. If the data layer hasn't changed, there's no need for the rendering layer to render. Only after receiving the notification does the rendering layer retrieve the new data layer information and subtract it from the previously recorded data layer information to identify the data change.
[0079] Exemplarily, as shown in FIG2C , the texture corresponding to each target sub-element in the data layer is assigned to the rendering entity to be drawn, and the rendering is performed on the screen by the rendering entity. By determining the difference between the information to be rendered in the current data layer and the rendered information in the previous data layer, the specific information of the latest sub-element modification (including deletion and addition) can be known. Then the animation is weaved according to the difference information and the rendering begins. Among them, the information to be rendered will maintain the write information of the target sub-element in the data layer, and will also maintain the rendered information in the previous data layer, and modify it before the next modification after each rendering. The state of the current data layer is recorded as a snapshot as the rendered information, and then the modification of the data layer is executed. After the rendering is completed, the rendering is ended to save performance and wait for the next startup of the element rendering core.
[0080] For each newly added target sub-element, interrupt the current animation of the target sub-element and record the animation-related parameters such as the current position, size, and transparency of the target sub-element; use the current animation-related parameters as the starting value and the first set value of the target sub-element as the ending value to create a slow-motion animation and play the slow-motion (smooth transition) animation. If there are no elements in the rendered information, it means that the target sub-element in the current data layer is displayed on the screen for the first time, and the preset first rendering logic can be used; if the rendered information records the target sub-element that has been displayed on the screen, it means that the newly added target sub-element in the data layer is not displayed on the screen for the first time, and the preset subsequent (non-first) rendering logic can be used.
[0081] The technical solution of the embodiment of the present disclosure determines the target sub-element added to the data layer through the rendering layer, can accurately capture the data changes in the data layer, and perform rendering when the target sub-element changes. It can use a single element as the rendering unit to completely render the target sub-element corresponding to the element; then, by rendering the target sub-element added to the data layer onto the screen according to preset animation parameters and animation-related parameters, the target sub-element can be rendered onto the screen with the preset animation parameter effect, thereby ensuring the display effect of the target sub-element.
[0082] Figure 3A is a flow chart of another element processing method provided by an embodiment of the present disclosure. The technical solution of this embodiment adds an explanation of the element deletion method on the basis of the above-mentioned embodiment. Optionally, after the target sub-element written in the data layer is displayed on the screen, it also includes: in response to an element deletion request, determining the element to be deleted, and determining the element processing status of the element, and canceling the on-screen display of the target sub-element corresponding to the element based on the element processing status, wherein the element processing status includes existing in the element queue, determining the target sub-element, and being displayed on the screen. For specific implementation methods, please refer to the description of this embodiment. Among them, the technical features that are the same or similar to those of the aforementioned embodiment will not be repeated here. As shown in Figure 3A, the method of this embodiment may specifically include:
[0083] S310 , in response to an element adding request, obtaining elements to be added, and adding the elements to an element queue one by one according to a preset adding order.
[0084] S320: Take out the elements from the element queue in sequence according to the preset adding order, determine the target sub-element corresponding to the taken-out element, and write the target sub-element into the data layer.
[0085] S330: Display the target sub-element written in the data layer on the screen.
[0086] S340: In response to the element deletion request, determine the element to be deleted, determine the element processing status of the element, and cancel the on-screen display of the target sub-element corresponding to the element based on the element processing status.
[0087] An element deletion request can be understood as a request to cancel the on-screen display of the target sub-element corresponding to the element. An element deletion request can be a request that acts on element generation, such as one or more requests to delete the element, cancel the selection of the element, or terminate the on-screen display of the element. As previously mentioned, an element may have one or more target sub-elements.
[0088] It should be noted that for the element to be deleted, all the corresponding target sub-elements will be cancelled from the screen display. For example, the target sub-elements that have been displayed on the screen are sub-element 1, sub-element 2, sub-element 3, sub-element 4, sub-element 5 and sub-element 6. Among them, sub-element 1 corresponds to element A, sub-element 2 and sub-element 3 correspond to element B, and sub-element 4, sub-element 5 and sub-element 6 correspond to element C. After receiving the deletion operation for element B, the on-screen display of sub-element 2 and sub-element 3 will be cancelled, that is, sub-element 2 and sub-element 3 will disappear from the screen.
[0089] Since the target sub-elements requested to be cancelled are all stored in the data layer, the element deletion request can specifically carry the element identification of the element to be deleted. The target sub-element corresponding to the element can be determined by the element identification, and the on-screen display of the target sub-element can be cancelled.
[0090] In the disclosed embodiments, the deletion operation is performed differently for elements in different element processing states. According to the execution logic of the element processing method, the element processing state may include, for example, one or more of the following states: existing in the element queue, determining the target sub-element, and being displayed on the screen.
[0091] After receiving an element deletion request, the element to be deleted can be determined based on the element deletion request, and the element processing status of the element can be detected to determine the subsequent deletion logic of the element. Exemplarily, canceling the on-screen display of the target sub-element corresponding to the element based on the element processing status includes at least one of the following operations: when the element processing status is that the target sub-element is being determined, interrupting the execution of the operation of determining one or more target sub-elements corresponding to the element being taken out; when the element processing status is that it exists in the element queue, deleting the element identifier of the element from the element queue; when the element processing status is that it has been displayed on the screen, deleting the target sub-element corresponding to the element from the data layer, and controlling the target sub-element to be canceled from the screen according to the preset disappearance animation and animation-related parameters through the rendering layer.
[0092] As shown in FIG3B , when the element supply side detects a deletion event, such as canceling the selection of an element to cancel the element's on-screen display, the element ID of the unselected element is determined. If the element processing status indicates that the element exists in the element queue, the element ID of the element is deleted from the element queue. Furthermore, an unselection operation can be performed to cancel the selection of the element.
[0093] Continuing with the previous example, if the child element corresponding to the element has already been displayed on the screen, you can traverse each element in the data layer, find the bit with the key being the element identifier of the element to be deleted and the flag bit being True, remove it from the data layer in sequence, and add it to the end of the data layer, while setting the flag bit to False. Each element in the data layer uses the flag bit variable to mark whether the current element is on the screen. It can be understood that if the flag bit is True, it means that this data bit is being rendered on the screen and cannot be overwritten; if the flag bit is False, it means that this data slot can be overwritten and is free space.
[0094] In the embodiment of the present disclosure, the target sub-element is controlled to be canceled from the screen according to the preset disappearing animation and animation-related parameters by the rendering layer, so that the target sub-element of the deleted element can be controlled to disappear from the screen in a smooth transition manner.
[0095] Optionally, when the element processing status is displayed on the screen, before the target sub-element is controlled to be undisplayed on the screen according to the preset disappearance animation, it also includes: if there are other elements in the process of determining the target sub-element, interrupt the execution of the operation of determining one or more target sub-elements corresponding to the element being taken out, and re-add the element identifier of the element in the process of determining the target sub-element to the head position in the element queue. It should be noted that the head position of the element queue can be understood as the position in the element queue that is first taken out for processing.
[0096] As mentioned above, in order to save performance, the maximum number of target sub-elements rendered on the full screen is limited. The target sub-elements that need to wait for disappearance can be regarded as free and available storage locations only after the animation of complete disappearance is completed. Therefore, when the element processing status is that the target sub-elements are being determined, the operation of determining one or more target sub-elements corresponding to the element being taken out is interrupted. If the operation of determining one or more target sub-elements corresponding to the element being taken out is continued at this time, there will be new target sub-elements that need to be rendered on the screen, which will be missed due to the wrong judgment that there is no new storage location (actually there is, but it is disappearing), or a new rendering entity will have to be allocated. When the animation of the disappearing sub-element is in progress, the new target sub-element on the screen is played synchronously, resulting in a waste of performance. At the same time, target sub-elements exceeding the maximum number of sub-elements may appear on the screen (some are disappearing), thereby affecting the on-screen display effect of the target sub-elements.
[0097] For each deleted target sub-element, the current animation of the target sub-element is interrupted, and the animation-related parameters such as the current position, size, and transparency of the target sub-element are recorded; the current animation-related parameters are used as the starting value, and the second set value of the target sub-element is used as the ending value, to create a slow-motion animation, and play the slow-motion (smooth transition) animation.
[0098] The technical solution of the embodiment of the present disclosure determines the element to be deleted in response to an element deletion request, can customize the deleted element, and determine the element processing status of the element. Based on the element processing status, the on-screen display of the target sub-element corresponding to the element is canceled, and the processing progress of the element can be accurately determined to delete the target sub-element using appropriate deletion logic and cancel the on-screen display of the target sub-element. The on-screen display of the target sub-element can be adjusted by operating the element, making element processing more flexible, realizing the linkage between the element and the target sub-element, enriching the interactive mode of element processing, and improving the interactive experience of element processing.
[0099] FIG4 is a schematic diagram of the structure of an element processing device provided by an embodiment of the present disclosure. As shown in FIG4 , the element processing device may specifically include: an element adding module 410, a sub-element extraction module 420, and an upper screen display module 430. Among them, the element adding module 410 is used to respond to an element adding request, obtain the element to be added, and add the element to the element queue one by one according to a preset adding order; the sub-element extraction module 420 is used to take the element out of the element queue in sequence according to the preset adding order, determine the target sub-element corresponding to the taken-out element, and write the target sub-element into the data layer; the upper screen display module 430 is used to display the target sub-element written in the data layer on the upper screen.
[0100] The technical solution of the embodiment of the present disclosure is to first respond to the element adding request through the element adding module to obtain the element to be added, support customized addition of elements, and thus realize dynamic processing of elements; then add the elements one by one to the element queue according to the preset adding order through the sub-element extraction module, and then take the elements out of the element queue in sequence according to the preset adding order, that is, the elements to be added can be processed according to the preset adding order through the element queue to obtain the target sub-elements corresponding to the elements in sequence; finally, write the target sub-element into the data layer through the upper screen display module, and then display the target sub-element written in the data layer on the upper screen, which effectively solves the technical problems of limited display space and time of elements and monotonous display method in related technologies, and can effectively ensure the data stability of the target sub-element, thereby ensuring the upper screen display effect of the target sub-element.
[0101] Based on the above-mentioned optional technical solutions, optionally, the upper screen display module 430 is specifically used to: determine the target sub-element added in the data layer through the rendering layer, and render the target sub-element added in the data layer on the upper screen according to preset animation parameters and animation association parameters.
[0102] Based on any optional technical solution of the embodiments of the present disclosure, optionally, the upper screen display module 430 is specifically used to: obtain rendered information and information to be rendered through the rendering layer, and determine the target sub-element added to the data layer based on the rendered information and the information to be rendered, wherein the rendered information is used to indicate the target sub-element written in the data layer during the last rendering, and the information to be rendered is used to indicate the target sub-element written in the data layer at the current moment.
[0103] Based on any optional technical solution of the embodiments of the present disclosure, optionally, the data layer includes a preset number of storage locations. Accordingly, the sub-element extraction module 420 can be specifically configured to: if there are unoccupied storage locations in the data layer, extract the elements to be processed from the element queue according to the preset addition order.
[0104] On the basis of any optional technical solution of the embodiment of the present disclosure, optionally, the sub-element extraction module 420 is further used to: write the target sub-elements one by one into the storage location based on the flag bit corresponding to each target sub-element, wherein one target sub-element is written into each storage location.
[0105] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the sub-element extraction module 420 includes: an element scaling processing unit, a sub-element screening unit, and a sub-element extraction unit. The element scaling processing unit is used to scale the extracted element to a preset size in proportion to a preset ratio, and extract the initial sub-element in the scaled element; the target sub-element screening unit is used to use the initial sub-element as the sub-element to be extracted if the initial sub-element meets the preset screening condition; the target sub-element extraction unit is used to obtain the projection transformation matrix used when extracting the sub-element to be extracted, and use the projection transformation matrix to extract the target sub-element from the element.
[0106] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the element adding module 410 includes: an element status determining unit and an element adding queue unit. The element status determining unit is used to determine, for each element, the element processing status corresponding to the element, and determine the element to be added to the element queue based on the element processing status, wherein the element processing status includes existing in the element queue, determining the target sub-element, and being displayed on the screen; the element adding queue unit is used to add the elements to be added to the element queue to the element queue one by one according to a preset addition order.
[0107] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the element processing device further includes: an element deletion module. The element deletion module is configured to, after displaying the target sub-element written in the data layer on the screen, determine the element to be deleted and the element processing status of the element in response to an element deletion request, and cancel the on-screen display of the target sub-element corresponding to the element based on the element processing status, wherein the element processing status includes existing in the element queue, determining the target sub-element, and having been displayed on the screen.
[0108] On the basis of any optional technical solution of the embodiment of the present disclosure, optionally, the element deletion module is used to perform at least one of the following operations: when the element processing status is determining the target sub-element, interrupt the execution of the operation of determining one or more target sub-elements corresponding to the element being taken out; when the element processing status is existing in the element queue, delete the element identifier of the element from the element queue; when the element processing status is displayed on the screen, delete the target sub-element corresponding to the element from the data layer, and control the target sub-element to be undisplayed on the screen through the rendering layer according to the preset disappearance animation and animation-related parameters.
[0109] On the basis of any optional technical solution of the embodiment of the present disclosure, the element processing device optionally further includes: an element reprocessing module. The element reprocessing module is configured to, when the element processing state is displayed on the screen, before the target sub-element is controlled to be canceled on the screen according to the preset disappearing animation, interrupt the execution of the operation of determining one or more target sub-elements corresponding to the removed element if there are other elements in the process of determining the target sub-element, and re-add the element identifier of the element in the process of determining the target sub-element to the head position in the element queue.
[0110] Based on any optional technical solution of the embodiments of the present disclosure, the element processing device may further include a display update module. The display update module is configured to update the display information of the target sub-element on the screen in a preset manner after writing the target sub-element into the data layer or deleting the target sub-element corresponding to the element from the data layer.
[0111] Based on any optional technical solution of the embodiment of the present disclosure, the element processing device optionally further includes: a rendering order updating module. The rendering order updating module is configured to, after writing the target sub-element into the data layer, update the rendering order corresponding to the target sub-elements according to the order in which the target sub-elements are written into the data layer if there are multiple target sub-elements.
[0112] The element processing device provided by the embodiment of the present disclosure can execute the element processing method provided by any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the element processing method.
[0113] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0114] FIG5 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Referring to FIG5 , a schematic diagram of the structure of an electronic device (such as a terminal device or server in FIG5 ) 500 suitable for implementing an embodiment of the present disclosure is shown below. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG5 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.
[0115] As shown in FIG5 , the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0116] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although FIG5 shows the electronic device 500 with various devices, it should be understood that not all of the devices shown are required to be implemented or present. More or fewer devices may alternatively be implemented or present.
[0117] 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, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0118] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0119] The electronic device provided by the embodiment of the present disclosure and the element processing method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0120] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the element processing method provided in the above embodiment is implemented.
[0121] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a 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 that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0122] In some embodiments, the client and server can communicate using any currently known or later developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or later developed network.
[0123] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0124] 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: responds to an element adding request, obtains the elements to be added, and adds the elements to the element queue one by one according to a preset adding order; takes the elements out of the element queue in sequence according to the preset adding order, determines the target sub-element corresponding to the taken-out element, and writes the target sub-element into the data layer; and displays the target sub-element written in the data layer on the screen.
[0125] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0126] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0127] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."
[0128] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0129] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0130] According to one or more embodiments of the present disclosure, [Example 1] provides an element processing method, including: in response to an element adding request, obtaining the elements to be added, and adding the elements to the element queue one by one according to a preset adding order; taking the elements out of the element queue in turn according to the preset adding order, determining the target sub-element corresponding to the taken-out element, and writing the target sub-element into the data layer; and displaying the target sub-element written in the data layer on the screen.
[0131] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, displaying the target sub-element written in the data layer on the screen includes: determining the target sub-element added to the data layer through a rendering layer, and rendering the target sub-element added to the data layer on the screen according to preset animation parameters and animation-associated parameters.
[0132] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, further including: optionally, determining the target sub-element added to the data layer through the rendering layer includes: obtaining rendered information and to-be-rendered information through the rendering layer, wherein the rendered information is used to indicate the target sub-element written in the data layer during the last rendering, and the to-be-rendered information is used to indicate the target sub-element written in the data layer at the current moment; determining the target sub-element added to the data layer based on the rendered information and the to-be-rendered information.
[0133] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 1, further including: optionally, the data layer includes a preset number of storage locations; the elements are taken out from the element queue in sequence according to the preset addition order, including: when there are unoccupied storage locations in the data layer, the elements to be processed are taken out from the element queue in the preset addition order.
[0134] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, further including: optionally, writing the target sub-element into the data layer includes: writing the target sub-elements one by one into the storage location based on the flag bit corresponding to each target sub-element, wherein one target sub-element is written into each storage location.
[0135] According to one or more embodiments of the present disclosure, [Example Six] provides the method of Example One, further including: optionally, determining the target sub-element corresponding to the element to be extracted, including: scaling the element to be extracted to a preset size in proportion to a preset ratio, and extracting the initial sub-element in the scaled element; if the initial sub-element meets a preset screening condition, using the initial sub-element as the sub-element to be extracted; obtaining the projection transformation matrix used when extracting the sub-element to be extracted, and using the projection transformation matrix to extract the target sub-element from the element.
[0136] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 1, further including: optionally, adding the elements to the element queue one by one in a preset adding order, including: for each of the elements, determining the element processing status corresponding to the element, and determining the element to be added to the element queue based on the element processing status, wherein the element processing status includes existing in the element queue, determining the target sub-element, and being displayed on the screen; adding the elements to be added to the element queue to the element queue one by one in the preset adding order.
[0137] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 1, further including: optionally, after the target sub-element written in the data layer is displayed on the screen, it also includes: in response to an element deletion request, determining the element to be deleted, and determining the element processing status of the element, and canceling the on-screen display of the target sub-element corresponding to the element based on the element processing status, wherein the element processing status includes existing in the element queue, determining the target sub-element, and being displayed on the screen.
[0138] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 8, further including: optionally, canceling the on-screen display of the target sub-element corresponding to the element based on the element processing status, including at least one of the following operations: when the element processing status is determining the target sub-element, interrupting the execution of the operation of determining one or more target sub-elements corresponding to the taken out element; when the element processing status is existing in the element queue, deleting the element identifier of the element from the element queue; when the element processing status is already displayed on the screen, deleting the target sub-element corresponding to the element from the data layer, and controlling the cancellation of the display of the target sub-element on the screen through the rendering layer according to the preset disappearance animation and animation-associated parameters.
[0139] According to one or more embodiments of the present disclosure, [Example 10] provides the method of Example 9, further including: optionally, when the element processing status is displayed on the screen, before controlling the target sub-element to be undisplayed on the screen according to the preset disappearance animation, it also includes: if there are other elements in the process of determining the target sub-element, interrupting the execution of the operation of determining one or more target sub-elements corresponding to the taken out element, and re-adding the element identifier of the element in the process of determining the target sub-element to the head position in the element queue.
[0140] According to one or more embodiments of the present disclosure, [Example 11] provides the method of Example 1 or Example 9, further including: optionally, after writing the target sub-element into the data layer, or deleting the target sub-element corresponding to the element from the data layer, it also includes: for the target sub-element that has been displayed on the screen, updating the display information of the target sub-element on the screen in a preset manner.
[0141] According to one or more embodiments of the present disclosure, [Example 12] provides the method of Example 1, further including: optionally, after writing the target sub-element into the data layer, further including: when there are multiple target sub-elements, updating the rendering order corresponding to the target sub-elements according to the writing order of the target sub-elements in the data layer.
[0142] According to one or more embodiments of the present disclosure, [Example 13] provides an element processing device, including: an element adding module, for obtaining the elements to be added in response to an element adding request, and adding the elements to the element queue one by one according to a preset adding order; a sub-element extraction module, for taking the elements out of the element queue in sequence according to the preset adding order, determining the target sub-element corresponding to the taken-out element, and writing the target sub-element into the data layer; an upper screen display module, for displaying the target sub-element written in the data layer on the upper screen.
[0143] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.
[0144] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0145] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. An element processing method, characterized in that, Including: In response to an element addition request, obtain the element to be added, and add the elements to the element queue one by one in the preset addition order; Take out the elements from the element queue in the preset addition order, determine the target sub-elements corresponding to the taken-out elements, and write the target sub-elements into the data layer; Display the target sub-elements written in the data layer on the screen.
2. The method for processing an element according to claim 1, wherein The displaying the target sub-elements written in the data layer on the screen includes: Determine the target sub-elements added in the data layer through the rendering layer, and render and display the target sub-elements added in the data layer according to the preset animation parameters and animation association parameters.
3. The method for processing an element according to claim 2, wherein The determining the target sub-elements added in the data layer through the rendering layer includes: Obtain the rendered information and the information to be rendered through the rendering layer, where the rendered information is used to indicate the target sub-elements already written in the data layer during the previous rendering, and the information to be rendered is used to indicate the target sub-elements already written in the data layer at the current moment; Determine the target sub-elements added in the data layer based on the rendered information and the information to be rendered.
4. The method for processing elements according to claim 1, wherein The data layer includes a preset number of storage locations; the taking out the elements from the element queue in the preset addition order includes: In the case where there are unoccupied storage locations in the data layer, take out the elements to be processed from the element queue in the preset addition order.
5. The method for processing elements according to claim 4, characterized in that, The writing the target sub-elements into the data layer includes: Based on the flag bits corresponding to each target sub-element, write the target sub-elements into the storage locations one by one, where one target sub-element is written into each storage location.
6. The method for processing elements according to claim 1, characterized in that, The determining the target sub-elements corresponding to the taken-out elements includes: Scale the taken-out element to a preset size in equal proportion according to a preset ratio, and extract the initial sub-elements from the scaled element; In the case where the initial sub-elements meet the preset screening conditions, use the initial sub-elements as the sub-elements to be extracted; Obtain the projection transformation matrix used when extracting the sub-elements to be extracted, and use the projection transformation matrix to extract the target sub-elements from the element.
7. The method for processing elements according to claim 1, characterized in that, The adding the elements to the element queue one by one in the preset addition order includes: For each element, determine the element processing status corresponding to the element, and determine the element to be added to the element queue based on the element processing status, where the element processing status includes existing in the element queue, being in the process of determining the target sub-elements, and already being displayed on the screen; Add the elements to be added to the element queue to the element queue one by one in the preset addition order.
8. The method for processing an element according to claim 1, characterized in that, After the target sub-elements written in the data layer are displayed on the screen, it further includes: In response to an element deletion request, determine the element to be deleted, and determine the element processing status of the element. Based on the element processing status, cancel the on-screen display of the target sub-elements corresponding to the element, where the element processing status includes being in the element queue, being in the process of determining the target sub-elements, and having been on-screen displayed.
9. The method for processing an element according to claim 8, wherein, The canceling the on-screen display of the target sub-elements corresponding to the element based on the element processing status includes at least one of the following operations: When the element processing status is being in the process of determining the target sub-elements, interrupt the operation of determining one or more target sub-elements corresponding to the taken-out element; When the element processing status is being in the element queue, delete the element identifier of the element from the element queue; When the element processing status is having been on-screen displayed, delete the target sub-elements corresponding to the element from the data layer, and control the target sub-elements to cancel the display on the screen according to a preset disappearance animation and animation association parameters through the rendering layer.
10. The method for processing an element according to claim 9, wherein When the element processing status is having been on-screen displayed, before controlling the target sub-elements to cancel the display on the screen according to the preset disappearance animation, further include: If there are other elements that are being in the process of determining the target sub-elements, interrupt the operation of determining one or more target sub-elements corresponding to the taken-out element, and re-add the element identifier of the element that is being in the process of determining the target sub-elements to the head position of the element queue.
11. The method for processing an element according to claim 1 or 9, characterized in that, After writing the target sub-elements into the data layer, or deleting the target sub-elements corresponding to the element from the data layer, further include: For the target sub-elements that have been on-screen displayed, update the display information of the target sub-elements on the screen in a preset manner.
12. The method for processing an element according to claim 1, wherein After writing the target sub-elements into the data layer, further include: When there are multiple target sub-elements, update the rendering order corresponding to the target sub-elements according to the writing order of the target sub-elements in the data layer.
13. An element processing device, characterized in that, Include: An element addition module, configured to obtain the element to be added in response to an element addition request, and add the element to the element queue one by one according to a preset addition order; A sub-element extraction module, configured to sequentially take out the elements from the element queue according to the preset addition order, determine the target sub-elements corresponding to the taken-out elements, and write the target sub-elements into the data layer; An on-screen display module, configured to perform on-screen display of the target sub-elements written in the data layer.
14. An electronic device, characterized in that, The electronic device includes: One or more processors; A storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the element processing method as described in any one of claims 1-12.
15. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions are used to execute the element processing method as described in any one of claims 1-12 when executed by a computer processor.
Citation Information
Patent Citations
Page rendering method and device
CN103678631A
Carousel graph display method and device, electronic equipment and computer readable medium
CN110764921A
Image rendering method and device
CN111145323A
Information reporting method and device for elements on page, electronic equipment and storage medium
CN111159600A
Element processing method and device, electronic equipment and storage medium
CN117873625A