CN116304242A - Data processing method, device, electronic equipment and storage medium - Google Patents

Data processing method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116304242A
CN116304242A CN202310165459.6A CN202310165459A CN116304242A CN 116304242 A CN116304242 A CN 116304242A CN 202310165459 A CN202310165459 A CN 202310165459A CN 116304242 A CN116304242 A CN 116304242A
Authority
CN
China
Prior art keywords
target
original
mapping
information
change type
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202310165459.6A
Other languages
Chinese (zh)
Inventor
杜强强
宋键
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
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
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202310165459.6A priority Critical patent/CN116304242A/en
Publication of CN116304242A publication Critical patent/CN116304242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data processing method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change; the target element comprises a mapping element and/or an original element; based on the element change type, a target processing mode for processing the target element is determined, so as to execute a target event corresponding to the change based on the target processing mode. The technical scheme of the embodiment of the invention solves the technical problems of low element synchronous processing performance and poor effect caused by the mode of copying codes or drawing canvas, realizes the improvement of the element change synchronism while ensuring the element consistency, and achieves the effect of improving the processing performance.

Description

Data processing method, device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computer processing, in particular to a data processing method, a data processing device, electronic equipment and a storage medium.
Background
In recent years, in order to improve the application experience of users, many products generally perform application based on mapping an element corresponding to a certain element in the products. For example, the element may be a window, text box, button, drop down menu, or the like. Currently, in order to ensure consistency between two elements, there are two main ways generally adopted, one way is to copy a logic code of the element to reconstruct a mapping element having the same logic as the element, and configure a plurality of monitor events (such as monitor events of scrolling, clicking, etc.), so that when the element change is monitored based on the monitor event, the logic code is executed to enable the two elements to change synchronously. Another way is to draw a mapping element through the canvas that is consistent with the element.
The inventors found that when implementing the present technical solution based on the above-described mode, the following problems exist:
based on the way of copying the elements by the copy code, the monitoring event needs to be configured in the logic code, and the problem of poor element synchronous processing performance exists. And in another canvas drawing-based mode, the changed elements cannot be effectively monitored, so that the elements cannot be synchronously changed.
Disclosure of Invention
The invention provides a data processing method, a data processing device, electronic equipment and a storage medium, which can improve the synchronism of element change while ensuring the element consistency, and achieve the technical effect of improving the processing performance.
In a first aspect, an embodiment of the present invention provides a data processing method, including:
when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element;
and determining a target processing mode for processing the target element based on the element change type, so as to execute a target event corresponding to the change based on the target processing mode.
Further, the method further comprises:
updating the display information of the target element based on a timing task, wherein the target element corresponds to the original element; or (b)
Triggering a presentation control corresponding to the target element is detected, wherein the target element corresponds to the mapping element.
Further, the method further comprises:
creating a mapping element corresponding to an original element, and adding an instance reference corresponding to the original element as a parameter to an element attribute of the mapping element, so as to execute a corresponding target event based on the element attribute when detecting that the association information corresponding to the target element changes.
Further, the method further comprises:
the element change type is an information change type, the target element is an original element, and the target processing mode comprises the following steps:
when the association information of the original element changes, the association information is sent to the mapping element corresponding to the original element, so that the mapping element is redrawn and displayed based on the updated association information.
Further, the method further comprises:
the element change type is an operation change type, the target element is the mapping element, and a target processing mode corresponding to the operation change type comprises the following steps:
Determining relative offset information between the mapping element and the corresponding original element;
and determining and executing the distribution event of the original element according to the triggering operation of the mapping element and the relative offset information.
Further, the method further comprises:
and determining the relative offset information according to the position information of the mapping element and the position information of the original element, wherein the relative offset information comprises transverse offset and longitudinal offset.
Further, the method further comprises:
determining target position information of the original element according to the current position information corresponding to the triggering operation and the relative offset information;
and executing a distribution event corresponding to the trigger operation based on the original element corresponding to the target position information.
In a second aspect, an embodiment of the present invention further provides a data processing apparatus, including:
the element change type determining module is used for determining an element change type corresponding to the change when the change of the association information associated with the target element is detected; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element;
And the target processing mode determining module is used for determining a target processing mode for processing the target element based on the element change type so as to execute a target event corresponding to the change based on the target processing mode.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
storage means 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 are caused to implement a data processing method as in any of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions which, when executed by a computer processor, are used to perform a data processing method as in any of the embodiments of the present invention.
According to the technical scheme, when the change of the associated information associated with the target element is detected, the element change type corresponding to the change is determined; based on the element change type, a target processing mode for processing the target element is determined, so as to execute a target event corresponding to the change based on the target processing mode. The technical scheme of the embodiment of the invention solves the technical problems of low element synchronous processing performance and poor effect caused by the mode of copying codes or drawing canvas in the prior art, and determines the element change type when the change happens by detecting whether the associated information of the mapping element and/or the original element changes. The method has the advantages that the active monitoring of the change is realized, and meanwhile, the target processing mode for processing the target element is determined through the element change type, so that the target event corresponding to the change is executed based on the target processing mode, the mapping element and the original element are kept consistent, the element consistency is ensured, the element change synchronism is improved, and the technical effect of improving the processing performance is achieved.
Drawings
In order to more clearly illustrate the technical solution of the exemplary embodiments of the present invention, a brief description is given below of the drawings required for describing the embodiments. It is obvious that the drawings presented are only drawings of some of the embodiments of the invention to be described, and not all the drawings, and that other drawings can be made according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an element display interface according to an embodiment of the present invention;
FIG. 3 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a data processing method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a data processing method according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Before the technical scheme is introduced, an application scene can be described. For example, in developing designs or applications for a product, it is often necessary to copy an element in the product to reproduce an element consistent with the element in order to enhance the user's experience. At this time, the element can be used as an original element, and the copied element can be used as a mapping element. For example, the element may be a button, text box, drop down menu, link, or the like. In order to ensure that both the original element and the mapping element are consistent all the time, the technical scheme provided by the embodiment of the invention can be adopted for implementation.
Fig. 1 is a flow chart of a data processing method according to an embodiment of the present invention, where the method may be applied to mapping elements, and the method may be performed by a data processing apparatus, where the apparatus may be implemented in software and/or hardware, and the hardware may be an electronic device, such as a mobile terminal, a PC or a server.
As shown in fig. 1, the method includes:
s110, when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change.
The target element includes a mapping element and/or an original element, that is, the target element may be the mapping element or the original element, and the mapping element corresponds to the original element. For example, in practical application, the element A2 consistent with the element A1 may be drawn, where A1 may be used as an original element, and A2 may be used as a mapping element corresponding to A1. The associated information associated with each target element may be the same or different, for example, the associated information may be content information of the target element, operation information of the target element, or location information of the target element, etc. The element change type includes an operation change type that triggers a mapping element and/or an information change type that alters the original element presentation information. The operation change type may refer to a type in which element information is changed by an operation such as a touch, a slide, a click, a drag, a long press, or the like. The presentation information may characterize the presented content, which may be, for example, video, pictures, text, icons, wire frames, buttons, and the like.
In this embodiment, whether the association information of the mapping element and/or the original element changes may be monitored, and if so, it is indicated that the target element changes. In order to enable the two elements to be consistent at this time, the element change type can be determined based on the element type by determining which element type the changed target element is. For example, if the target element of the change is a map element, then the element change type may be considered an operation change type, and if it is an original element, then the element change type may be considered an information change type. Alternatively, the element change type may be determined by determining what information type the changed associated information is, and further determining the element change type based on the information type, for example, if the changed associated information is content of an element (such as element color change, font change, etc.), the element change type may be considered as the information change type, and if the changed associated information is operation information generated by triggering the target element, the element change type may be considered as the operation change type. Alternatively, the element change type may be determined by combining the target element and corresponding association information, for example, the changed target element is a mapping element, the association information of a specific change is the content of the element, and then the element change type is an information change type.
It should be noted that there may be at least two implementations for detecting a change in association information associated with a target element, and these two implementations may be described separately below.
One implementation may be: the presentation information of the target element is updated based on the timed task, the target element corresponding to the original element.
The timing tasks may be preconfigured, and may include update frequency, update mode, and the like. For example, the display information of the target element is updated every 0.5ms or 1s, and the color of the character 1 in the target element is updated according to the blue, black, green, red and other rounds.
In practical application, if the timing task is monitored to update the display information of the original element, the display information of the original element can be considered to be changed, namely, the association information associated with the target element is considered to be detected to be changed. For example, referring to fig. 2, there may be an original element and a mapping element consistent with the original element in the product page, where the original element may be in a hidden state or in a display state. If the timer updates the text of the original element from red to green, then a change in the font color (i.e., associated information) associated with the original element is deemed to be detected.
Another implementation may be: the trigger is detected to be a presentation control corresponding to a target element, the target element corresponding to a mapping element.
The presentation control may be a touch component for presenting the mapping element, for example, may be a button, a sliding bar, or the like, and may be displayed in any form, and is not limited.
In practical application, a control for showing the mapping element can be developed in advance, for example, a showing control corresponding to the mapping element can be drawn by a canvas drawing method for displaying. When the user is detected to trigger the control, the association information associated with the mapping element is considered to be detected to change. For example, referring still to fig. 2, if a button dragging the mapping element is detected to slide rightward, then it may be considered that a triggering operation of the button is detected.
The benefits of this arrangement are: by monitoring the change condition of the original element display information and monitoring the triggering operation of the mapping element by a user, whether the associated information is changed or not is determined, the monitoring event is not required to be configured in a logic code, the accuracy and the comprehensiveness of the change monitoring are improved, and the processing performance is improved.
S120, determining a target processing mode for processing the target element based on the element change type, so as to execute a target event corresponding to the change based on the target processing mode.
The target processing method may be a method used when an unchanged element is processed to be consistent with the changed element. The target event may be a drawing event for redrawing the same element.
Specifically, after the element change type is determined, a manner for processing the target element corresponding to the element change type may be called as a target processing manner. Further, the target processing manner may be executed to process the target element, for example, when the display content of the original element changes, the mapping element consistent with the changed original element is synchronously redrawn and displayed, or when the mapping element is triggered to move, the control corresponding to the original element is synchronously controlled to move.
It should be noted that, when the target element is created, the original element and the mapping element corresponding to the original element may be added to different parent containers respectively by independently creating the element, so as to ensure that the interaction between the mapping element and the original element is not affected.
In this embodiment, a mapping element corresponding to the original element may also be created, and an instance corresponding to the original element is referred to as a parameter and added to an element attribute of the mapping element, so as to execute a corresponding target event based on the element attribute when a change in association information corresponding to the target element is detected.
Wherein an instance reference may refer to a memory address. For example, when the original element is actually created, a memory address is declared for the original element, so that the drawing information of the original element is stored under the memory address, and the memory address is the instance reference.
Specifically, a map element may be created by declaring a map element corresponding to the original element. Further, the memory address holding the original element instance may be used as an instance reference, and the instance reference may be added as a parameter to the element attribute of the mapping element. When the change of the association information corresponding to the target element is detected, the original element instance is called based on the instance reference in the element attribute, and the mapping element is drawn on the canvas based on the instance. The benefits of this arrangement are: the redrawing of the mapping elements can be realized without copying codes, and the effect of ensuring consistency among the elements is achieved while the processing performance is improved.
For example, an instance reference of an original element may be added as a parameter to an element attribute of MappingView (i.e., a map element), and the onDraw method of MappingView may be rewritten for drawing the own content. In the onDraw method, a draw method of an original element is used, the parameter of the draw method is Canvas of the map ingview, and the UI (User Interface) content (i.e. presentation information) of the original element is drawn into the map ingview, so that the UIs of the original element and the mapped element are identical, which is equivalent to drawing the map ingview through the original element.
According to the technical scheme, when the change of the associated information associated with the target element is detected, the element change type corresponding to the change is determined; based on the element change type, a target processing mode for processing the target element is determined, so as to execute a target event corresponding to the change based on the target processing mode. The technical scheme of the embodiment of the invention solves the technical problems of low element synchronous processing performance and poor effect caused by the mode of copying codes or drawing canvas in the prior art, and determines the element change type when the change happens by detecting whether the associated information of the mapping element and/or the original element changes. The method has the advantages that the active monitoring of the change is realized, and meanwhile, the target processing mode for processing the target element is determined through the element change type, so that the target event corresponding to the change is executed based on the target processing mode, the mapping element and the original element are kept consistent, the element consistency is ensured, the element change synchronism is improved, and the technical effect of improving the processing performance is achieved.
Fig. 3 is a schematic flow chart of a data processing method according to an embodiment of the present invention, on the basis of the foregoing embodiment, if an element change type is an information change type and a target element is an original element, then the relevant information may be sent to a mapping element corresponding to the original element by executing, and further, a target processing manner of the mapping element is redrawn based on the relevant information, so as to ensure that the mapping element is consistent with the original element. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 3, the method specifically includes the following steps:
s210, when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change.
S220, if the element change type is the information change type and the target element is the original element, when the association information of the original element is changed, the association information is sent to the mapping element corresponding to the original element, so that the mapping element is redrawn and displayed based on the updated association information.
In the present embodiment, if it is determined that the element change type is the information change type, the associated information indicating that the original element is changed. At this time, the whole data of the original drawing element can be used as the association information to be sent to the mapping element, the association information which changes can be sent to the mapping element corresponding to the original element, and then the changed part is drawn on the canvas of the mapping element, and is integrated with the unchanged part to reconstruct new mapping element display; or, the original element informs the mapping element to redraw, and then the mapping element automatically invokes the original element instance based on the instance reference in the element attribute, and the mapping element is drawn on the canvas based on the association information as association information, so that the redrawing of the mapping element is realized, and the consistency of the mapping element and the original element is ensured.
For example, when the display information of the original element is changed, the refresh drawing method of the MappingView may be notified, so that the MappingView is redrawn. For example, the refresh redraw of the MappingView may be notified in the parent control draw method of the original element, or the refresh redraw of the MappingView may be notified when the original element is logically interactive. Therefore, after the display information of the original element is changed, the display content can be synchronized into the MappingView at the same time, so that the UI of the original element and the UI of the original element are consistent, no complex logic interaction exists in the processing process, the operation of a main thread is not influenced, the effect that the UI is completely the same is achieved only by drawing the mapping element once, and the processing performance is improved.
According to the technical scheme, when the association information of the original element is changed, the association information is sent to the mapping element corresponding to the original element, so that the mapping element is redrawn and displayed based on the updated association information, the mapping element consistent with the original element is refreshed and redrawn while the original element is changed, the two elements are synchronously changed, and consistency is maintained.
Fig. 4 is a schematic flow chart of a data processing method according to an embodiment of the present invention, on the basis of the foregoing embodiment, if an element change type is an operation change type and a target element is a mapping element, then the original element and the mapping element may be made consistent by executing a target processing manner based on event offset, and a specific implementation manner of the method may refer to a technical solution of this embodiment. Wherein, the technical terms identical to or corresponding to the above embodiments are not repeated herein.
As shown in fig. 4, the method includes:
s310, when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change.
S320, if the element change type is the operation change type and the target element is the mapping element, determining relative offset information between the mapping element and the corresponding original element.
In this embodiment, if it is determined that the element change type is the operation change type, the description is that the association information of the mapping element is changed, that is, the triggering operation of the presentation control of the mapping element occurs. At this time, the relative offset information of the mapping element and the original element can be determined according to the position information of the two elements. The location information may refer to location information of an element on the page, and may include a horizontal coordinate value and a vertical coordinate value. The relative offset information includes a lateral offset and a longitudinal offset.
Specifically, the lateral coordinate value of the map element and the lateral coordinate value of the original element may be differenced, and the difference value may be regarded as the lateral offset. And taking the difference value as the longitudinal offset. Further, the relative offset information may be derived based on the lateral offset and the longitudinal offset.
For example, referring to fig. 5, in an actual scenario, UI coordinates (i.e., location information) of a mapping element and an original element are different, and an actual event logic is in the original element, so that when performing interaction of actions such as triggering on the mapping element, an event needs to be subjected to coordinate shift. The relative coordinates (i.e., relative offset information) of the map element to the original element may be obtained at this time to make the original element and the map element consistent based on the relative offset information. For example, assuming that the position information of the original element is (x 1, y 1) = (50,300) and the position information of the mapped element is (x 2, y 2) = (100 ), the relative offset information= (x 2-x1, y2-y 1) = (100-50,100-300) = (50, -200).
S330, determining and executing a distribution event of the original element according to the triggering operation and the relative offset information of the mapping element.
In this embodiment, after the relative offset information is determined, the distribution event of the original element may be invoked. Further, the triggering operation of the mapping element is intercepted by the distributing event, and meanwhile, the relative offset information is distributed, so that the triggering operation is equivalent to the triggering of the original element when the mapping element is triggered, and the two elements generate the same triggering effect. By way of example, the event after the deviation can be distributed through the original element dispatchTouchEvent, the event distribution interception operation of the original element is used, after the deviation, the original element can trigger the event, and the arrival event is not different from the event which directly triggers the original element.
It should be noted that, in order to make the interaction event of the UI coincide with the original trigger event, the trigger event may be intercepted when the trigger event of the operation on the mapping element is triggered, and after calculating the offset of the current position information of the trigger operation relative to the relative offset information, the offset position may be distributed based on the original element.
In this embodiment, determining and executing a distribution event of an original element according to a trigger operation on a mapping element and relative offset information includes: determining target position information of the original element according to the current position information and the relative offset information corresponding to the triggering operation; a distribution event corresponding to the trigger operation is performed based on the original element corresponding to the target position information.
Specifically, when the triggering operation on the mapping element is monitored, the current position information corresponding to the triggering operation can be determined. Further, the current position information and the relative offset information may be differenced to obtain one piece of position information as target position information of the original element, and the target position information may be distributed based on the original element. For example, with continued reference to FIG. 5, if interactions of touch or the like are made on the mapping element, the relative offset information of the mapping element with respect to the original element is obtained, and the relative offset information may be subtracted from the current trigger event location (i.e., the current location information corresponding to the trigger operation). And then rewriting a mapping element dispatchTouchEvent method, and distributing the shifted event through an original element dispatchTouchEvent method.
For example, referring to FIG. 6, if there is an interaction of touch behavior on original element A, then it is deemed that a show control corresponding to original element A was detected as triggered. After the interaction event is triggered, when the associated information of the original element A changes, the original element A can be automatically informed to draw by utilizing a listening mode in a drawing way, and a refreshing method of the mapping element B is called by a drawing method, so that the mapping element B can trigger drawing operation of the original element A in a mapping element canvas, the associated information of the mapping element B changes synchronously, the event response result is consistent, and the UI consistency and the synchronism of the mapping element and the original element are improved.
According to the technical scheme of the embodiment of the invention, the relative offset information between the mapping element and the corresponding original element is determined, the distribution event of the original element is determined and executed according to the triggering operation and the relative offset information of the mapping element, and the synchronous change of the mapping element and the corresponding original element is realized in an event offset mode.
Fig. 7 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, where the apparatus includes: element change type determination module 410 and target processing mode determination module 420.
Wherein, the element change type determining module 410 is configured to determine, when detecting that the association information associated with the target element changes, an element change type corresponding to the change; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element; and a target processing mode determining module 420, configured to determine a target processing mode for processing the target element based on the element change type, so as to execute a target event corresponding to the change based on the target processing mode.
Optionally, on the basis of the device, the element change type includes an operation change type of triggering the mapping element and/or an information change type of changing the original element display information.
On the basis of the above device, optionally, the element change type determining module 410 is specifically configured to update the presentation information of the target element based on a timing task, where the target element corresponds to the original element; or (b)
Triggering a presentation control corresponding to the target element is detected, wherein the target element corresponds to the mapping element.
On the basis of the above device, optionally, the device further includes an element creation module, configured to create a mapping element corresponding to an original element, and add an instance reference corresponding to the original element as a parameter to an element attribute of the mapping element, so as to execute a corresponding target event based on the element attribute when a change of association information corresponding to the target element is detected.
On the basis of the above device, optionally, the element change type is an information change type, the target element is an original element, the target processing manner determining module 420 includes a target processing manner determining first unit, and the target processing manner determining first unit is configured to send, when association information of the original element changes, the association information to a mapping element corresponding to the original element, so as to redraw and display the mapping element based on the updated association information.
On the basis of the above apparatus, optionally, the element change type is an operation change type, the target element is the mapping element, and the target processing manner determining module 420 further includes a relative offset information determining unit and a distribution event executing unit.
A relative offset information determining unit configured to determine relative offset information between the mapping element and the corresponding original element;
and the distribution event execution unit is used for determining and executing the distribution event of the original element according to the triggering operation of the mapping element and the relative offset information.
On the basis of the above device, optionally, the relative offset information determining unit is specifically configured to determine the relative offset information according to the position information of the mapping element and the position information of the original element, where the relative offset information includes a lateral offset and a longitudinal offset.
On the basis of the above device, optionally, the distribution event execution unit includes
A target position information determining subunit, configured to determine target position information of the original element according to current position information corresponding to the trigger operation and the relative offset information;
and the distribution event execution subunit is used for executing the distribution event corresponding to the trigger operation based on the original element corresponding to the target position information.
According to the technical scheme, when the change of the associated information associated with the target element is detected, the element change type corresponding to the change is determined; based on the element change type, a target processing mode for processing the target element is determined, so as to execute a target event corresponding to the change based on the target processing mode. The technical scheme of the embodiment of the invention solves the technical problems of low element synchronous processing performance and poor effect caused by the mode of copying codes or drawing canvas in the prior art, and determines the element change type when the change happens by detecting whether the associated information of the mapping element and/or the original element changes. The method has the advantages that the active monitoring of the change is realized, and meanwhile, the target processing mode for processing the target element is determined through the element change type, so that the target event corresponding to the change is executed based on the target processing mode, the mapping element and the original element are kept consistent, the element consistency is ensured, the element change synchronism is improved, and the technical effect of improving the processing performance is achieved.
The data processing device provided by the embodiment of the invention can execute the data processing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that, the units and modules included in the above system are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present invention.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. Fig. 8 shows a block diagram of an exemplary electronic device 50 suitable for use in implementing the embodiments of the present invention. The electronic device 50 shown in fig. 8 is merely an example and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 50 is in the form of a general purpose computing device. Components of electronic device 50 may include, but are not limited to: one or more processors or processing units 501, a system memory 502, and a bus 503 that connects the various system components (including the system memory 502 and processing units 501).
Bus 503 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, and not limitation, such architectures include Industry Standard Architecture (ISA) bus, micro channel architecture (MAC) bus, enhanced ISA bus, video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 50 typically includes a variety of computer system readable media. Such media can be any available media that is accessible by electronic device 50 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 502 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM) 504 and/or cache memory 505. Electronic device 50 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 506 may be used to read from or write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, commonly referred to as a "hard disk drive"). Although not shown in fig. 8, a magnetic disk drive for reading from and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), and an optical disk drive for reading from or writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be coupled to bus 503 through one or more data medium interfaces. Memory 502 may include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the invention.
A program/utility 508 having a set (at least one) of program modules 507 may be stored, for example, in memory 502, such program modules 507 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment. Program modules 507 typically perform the functions and/or methods of the described embodiments of the invention.
The electronic device 50 may also communicate with one or more external devices 509 (e.g., keyboard, pointing device, display 810, etc.), one or more devices that enable a user to interact with the electronic device 50, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device 50 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 511. Also, the electronic device 50 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through a network adapter 512. As shown, the network adapter 512 communicates with other modules of the electronic device 50 over the bus 503. It should be appreciated that although not shown in fig. 8, other hardware and/or software modules may be used in connection with electronic device 50, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage systems, and the like.
The processing unit 501 executes various functional applications and data processing by running a program stored in the system memory 502, for example, implements the data processing method provided by the embodiment of the present invention.
Embodiments of the present invention also provide a storage medium containing computer executable instructions which, when executed by a computer processor, are configured to perform a data processing method comprising:
when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element;
and determining a target processing mode for processing the target element based on the element change type, so as to execute a target event corresponding to the change based on the target processing mode.
The computer storage media of embodiments of the invention may take the form of any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (for example, through the Internet using an Internet service provider).
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (11)

1. A method of data processing, comprising:
when detecting that the association information associated with the target element changes, determining an element change type corresponding to the change; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element;
and determining a target processing mode for processing the target element based on the element change type, so as to execute a target event corresponding to the change based on the target processing mode.
2. The method of claim 1, wherein the element change type comprises an operation change type that triggers a mapping element and/or an information change type that alters original element presentation information.
3. The method of claim 1, wherein detecting a change in association information associated with the target element comprises:
updating the display information of the target element based on a timing task, wherein the target element corresponds to the original element; or (b)
Triggering a presentation control corresponding to the target element is detected, wherein the target element corresponds to the mapping element.
4. The method as recited in claim 1, further comprising:
creating a mapping element corresponding to an original element, and adding an instance reference corresponding to the original element as a parameter to an element attribute of the mapping element, so as to execute a corresponding target event based on the element attribute when detecting that the association information corresponding to the target element changes.
5. The method according to claim 2, wherein the element change type is an information change type, the target element is an original element, and the target processing manner includes:
When the association information of the original element changes, the association information is sent to the mapping element corresponding to the original element, so that the mapping element is redrawn and displayed based on the updated association information.
6. The method according to claim 2, wherein the element change type is an operation change type, the target element is the mapping element, and a target processing manner corresponding to the operation change type includes:
determining relative offset information between the mapping element and the corresponding original element;
and determining and executing the distribution event of the original element according to the triggering operation of the mapping element and the relative offset information.
7. The method of claim 6, wherein the determining the relative offset information between the mapped element and the corresponding original element comprises:
and determining the relative offset information according to the position information of the mapping element and the position information of the original element, wherein the relative offset information comprises transverse offset and longitudinal offset.
8. The method of claim 7, wherein determining and executing the distribution event of the original element based on the trigger operation and the relative offset information for the mapped element comprises:
Determining target position information of the original element according to the current position information corresponding to the triggering operation and the relative offset information;
and executing a distribution event corresponding to the trigger operation based on the original element corresponding to the target position information.
9. A data processing apparatus, comprising:
the element change type determining module is used for determining an element change type corresponding to the change when the change of the association information associated with the target element is detected; wherein the target element comprises a mapping element and/or an original element, and the mapping element corresponds to the original element;
and the target processing mode determining module is used for determining a target processing mode for processing the target element based on the element change type so as to execute a target event corresponding to the change based on the target processing mode.
10. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data processing method of any of claims 1-8.
11. A storage medium containing computer executable instructions for performing the data processing method of any of claims 1-8 when executed by a computer processor.
CN202310165459.6A 2023-02-24 2023-02-24 Data processing method, device, electronic equipment and storage medium Pending CN116304242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310165459.6A CN116304242A (en) 2023-02-24 2023-02-24 Data processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310165459.6A CN116304242A (en) 2023-02-24 2023-02-24 Data processing method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116304242A true CN116304242A (en) 2023-06-23

Family

ID=86823279

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310165459.6A Pending CN116304242A (en) 2023-02-24 2023-02-24 Data processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116304242A (en)

Similar Documents

Publication Publication Date Title
US10877826B2 (en) Message processing method and apparatus, storage medium, and computer device
CN109857486B (en) Method, device, equipment and medium for processing program page data
CN109902255B (en) Page mixed browsing record generation method, device, equipment and storage medium
US20140359494A1 (en) Systems and methods for using screen sampling to detect display changes
CN103135987A (en) Dynamic icon display method and device
CN109375980B (en) Touch drawing method based on Andriod system
CN110019464B (en) Page processing method and device
CN111767002B (en) Page display method, device, equipment and storage medium
CN106294463B (en) Data point updating method and equipment for dynamic curve
CN112272109A (en) Network topological graph generation method, equipment and system
CN109582317B (en) Method and apparatus for debugging hosted applications
WO2017004141A1 (en) Systems and methods for providing multi-focus to applications for collaboration
CN110807161A (en) Page framework rendering method, device, equipment and medium
CN111667199A (en) Workflow construction method and device, computer equipment and storage medium
CN115309470B (en) Method, device, equipment and storage medium for loading widget
US10120735B2 (en) Touch application programming interfaces
CN113688341B (en) Dynamic picture decomposition method and device, electronic equipment and readable storage medium
CN114115681A (en) Page generation method and device, electronic equipment and medium
CN107621951B (en) View level optimization method and device
CN110908552B (en) Multi-window operation control method, device, equipment and storage medium
CN108920230B (en) Response method, device, equipment and storage medium for mouse suspension operation
CN116304242A (en) Data processing method, device, electronic equipment and storage medium
CN116775174A (en) Processing method, device, equipment and medium based on user interface frame
CN109960562B (en) Information display method and device and computer readable storage medium
CN112667939A (en) Webpage refreshing method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination