CN108958954B - Method and device for message transmission between modules, electronic equipment and computer readable medium - Google Patents
Method and device for message transmission between modules, electronic equipment and computer readable medium Download PDFInfo
- Publication number
- CN108958954B CN108958954B CN201810733104.1A CN201810733104A CN108958954B CN 108958954 B CN108958954 B CN 108958954B CN 201810733104 A CN201810733104 A CN 201810733104A CN 108958954 B CN108958954 B CN 108958954B
- Authority
- CN
- China
- Prior art keywords
- module
- root node
- feature
- change
- modules
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 230000005540 biological transmission Effects 0.000 title abstract description 26
- 230000008859 change Effects 0.000 claims abstract description 125
- 230000000694 effects Effects 0.000 claims description 39
- 238000011161 development Methods 0.000 abstract description 13
- 238000012546 transfer Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 4
- 238000012986 modification Methods 0.000 description 4
- 230000004048 modification Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 3
- 239000000203 mixture Substances 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 230000004075 alteration Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000006798 recombination Effects 0.000 description 1
- 238000005215 recombination Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/546—Message passing systems or structures, e.g. queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The present disclosure discloses a method of inter-module message transfer, an inter-module message transfer apparatus, an electronic device, and a computer-readable storage medium. The message transmission method among the modules comprises the following steps: establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules; when the first module changes, sending a message to a main control unit to control a first root node corresponding to the first module to change; transmitting the changed message to a second root node corresponding to the second module so as to change the second root node; causing a change to a second module based on the change to the second root node. According to the embodiment of the disclosure, the message transmission among the modules is controlled by establishing the main control unit, so that the efficient transmission of the messages among the modules is realized, the development speed of the interface is increased, and the user experience of the interface is improved.
Description
Technical Field
The present disclosure relates to the field of programming technologies, and in particular, to a method and an apparatus for message passing between modules, an electronic device, and a computer-readable medium.
Background
The Interface is also called as UI, the UI is short for User Interface, and the UI design refers to the overall design of human-computer interaction, operation logic and attractive Interface of software. UI designs are divided into physical UIs and virtual UIs.
Modules in an interface in the prior art, such as a UI module in an editing software, include a toolbar, a property bar, a display bar, a resource bar, and the like, when one of the modules is selected, and the position, the size, the shape, and the like of the selected module are changed, the corresponding positions, the sizes, and the shapes of the other modules are also changed correspondingly, which affects user experience.
In addition, when a plurality of modules in the interface in the prior art perform message transmission, the modules directly communicate with each other, and when a plurality of modules perform communication, a complex message transmission table needs to be maintained, and the logical relationship is complex, so that the difficulty of message transmission among the modules is increased, and the efficiency of module development in the interface is low.
In view of the above, it is an urgent technical problem to provide an inter-module message transfer method for efficiently transferring messages between modules, thereby improving the development speed of an interface and improving the experience of a user of the interface.
Disclosure of Invention
The technical problem solved by the present disclosure is to provide a method for message passing between modules, so as to at least partially solve the technical problem of how to efficiently pass messages between modules, thereby improving the development speed of an interface and improving the experience of a user of the interface. Further, an inter-module message transfer apparatus, an electronic device, and a computer-readable storage medium are provided.
In order to achieve the above object, according to one aspect of the present disclosure, the following technical solutions are provided:
a method for message passing between modules, comprising:
establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules;
when the first module changes, sending a message to a main control unit to control a first root node corresponding to the first module to change;
transmitting the changed message to a second root node corresponding to the second module so as to change the second root node;
causing a change to a second module based on the change to the second root node.
Further, after the first module is changed and the first root node corresponding to the first module is changed, the method further includes:
and the main control unit analyzes the change of the first root node to obtain a second root node related to the change.
Further, the different modules include: the device comprises a special effect module, a resource module, a display module and an attribute module.
Further, the first module is changed, including: selecting a feature in the first module, adding a feature in the first module, deleting a feature in the first module, and/or adjusting an attribute of a feature in the first module.
Further, the characteristics include related data, and the category of the related data is a preset category.
Further, the categories include resource categories, display categories, and/or attribute categories.
Further, when the change is that the feature in the first module is selected, determining a first child node related to the feature in the first root node tree, and selecting the first child node related to the feature;
after the first child node related to the feature is selected, determining first data related to the first child node, and determining a second child node of a second root node tree according to the first data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
Further, when the change is that the feature in the first module is added, determining a first root node related to the feature, and establishing a first root node tree related to the feature according to the first root node related to the feature;
determining second data related to the features, and establishing a second root node tree of a tree related to the second data according to the second data and a second root node, wherein the second root node tree comprises a second child node related to the second data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
Further, when the change is deleting a feature in a first module, determining a first root node related to the feature, and deleting a first root node tree related to the feature according to the first root node related to the feature;
determining third data related to the features, searching a second root node tree related to the third data, and deleting the second root node tree, wherein the second root node tree comprises a third child node related to the third data;
in a second module corresponding to the second root node, deleting a third feature associated with the third child node.
Further, when the change is to adjust the feature in the first module, determining a first root node related to the feature, and adjusting a first root node tree related to the feature according to the first root node related to the feature;
determining fourth data related to the features, searching a second root node tree related to the fourth data, and adjusting the second root node tree, wherein the second root node tree comprises a fourth child node related to the fourth data;
displaying, in a second module corresponding to the second root node, a fourth feature associated with the fourth child node.
In order to achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
an apparatus for inter-module messaging, comprising:
the system comprises a building device, a control device and a control device, wherein the building device is used for building a main control unit, the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules;
the message sending device is used for sending a message to the main control unit when the first module changes and controlling the first root node corresponding to the first module to change;
message transmitting means for transmitting the changed message to a second root node corresponding to the second module, so that the second root node is changed;
means for causing a change to the second module based on the change to the second root node.
Further, still include: the analysis device is configured to, after a first root node corresponding to a first module changes when the first module changes, analyze, by the main control unit, the change of the first root node to obtain a second root node related to the change.
Further, the different modules include: the device comprises a special effect module, a resource module, a display module and an attribute module.
Further, the first module is changed, including: selecting a feature in the first module, adding a feature in the first module, deleting a feature in the first module, and/or adjusting an attribute of a feature in the first module.
Further, the characteristics include related data, and the category of the related data is a preset category.
Further, the categories include resource categories, display categories, and/or attribute categories.
Further, when the change is that the feature in the first module is selected, determining a first child node related to the feature in the first root node tree, and selecting the first child node related to the feature;
after the first child node related to the feature is selected, determining first data related to the first child node, and determining a second child node of a second root node tree according to the first data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
Further, when the change is that the feature in the first module is added, determining a first root node related to the feature, and establishing a first root node tree related to the feature according to the first root node related to the feature;
determining second data related to the features, and establishing a second root node tree of a tree related to the second data according to the second data and a second root node, wherein the second root node tree comprises a second child node related to the second data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
Further, when the change is deleting a feature in a first module, determining a first root node related to the feature, and deleting a first root node tree related to the feature according to the first root node related to the feature;
determining third data related to the features, searching a second root node tree related to the third data, and deleting the second root node tree, wherein the second root node tree comprises a third child node related to the third data;
in a second module corresponding to the second root node, deleting a third feature associated with the third child node.
Further, when the change is to adjust the feature in the first module, determining a first root node related to the feature, and adjusting a first root node tree related to the feature according to the first root node related to the feature;
determining fourth data related to the features, searching a second root node tree related to the fourth data, and adjusting the second root node tree, wherein the second root node tree comprises a fourth child node related to the fourth data;
displaying, in a second module corresponding to the second root node, a fourth feature associated with the fourth child node.
In order to achieve the above object, according to another aspect of the present disclosure, the following technical solutions are also provided:
an electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor, and the instructions are executable by the at least one processor to enable the at least one processor to perform the steps of the message passing method technical solution between any of the above modules.
In order to achieve the above object, according to still another aspect of the present disclosure, the following technical solutions are also provided:
a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the steps of any one of the above-described aspects of the message passing method between modules.
The disclosed embodiments provide a method and apparatus for message transmission between modules, an electronic device, and a computer-readable storage medium. The message transmission method among the modules comprises the following steps: establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules; when the first module changes, sending a message to a main control unit to control a first root node corresponding to the first module to change; transmitting the changed message to a second root node corresponding to the second module so as to change the second root node; causing a change to a second module based on the change to the second root node. According to the embodiment of the disclosure, the message transmission among the modules is controlled by establishing the main control unit, so that the efficient transmission of the messages among the modules is realized, the development speed of the interface is increased, and the user experience of the interface is improved.
The foregoing is a summary of the present disclosure, and for the purposes of promoting a clear understanding of the technical means of the present disclosure, the present disclosure may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
Drawings
Fig. 1 is a flowchart illustrating a method for message passing between modules according to an embodiment of the disclosure.
Fig. 2 is a flowchart illustrating a method for message passing between modules according to another embodiment of the disclosure.
Fig. 3 is a schematic structural diagram of an inter-module message passing apparatus according to an embodiment of the present disclosure.
Fig. 4 is a schematic structural diagram of an inter-module message passing apparatus according to another embodiment of the present disclosure.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Fig. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present disclosure.
Detailed Description
The embodiments of the present disclosure are described below with specific examples, and other advantages and effects of the present disclosure will be readily apparent to those skilled in the art from the disclosure in the specification. It is to be understood that the described embodiments are merely illustrative of some, and not restrictive, of the embodiments of the disclosure. The disclosure may be embodied or carried out in various other specific embodiments, and various modifications and changes may be made in the details within the description without departing from the spirit of the disclosure. It is to be noted that the features in the following embodiments and examples may be combined with each other without conflict. All other embodiments, which can be derived by a person skilled in the art from the embodiments disclosed herein without making any creative effort, shall fall within the protection scope of the present disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the appended claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the disclosure, one skilled in the art should appreciate that one aspect described herein may be implemented independently of any other aspects and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. Additionally, such an apparatus may be implemented and/or such a method may be practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
It should be noted that the drawings provided in the following embodiments are only for illustrating the basic idea of the present disclosure, and the drawings only show the components related to the present disclosure rather than the number, shape and size of the components in actual implementation, and the type, amount and ratio of the components in actual implementation may be changed arbitrarily, and the layout of the components may be more complicated.
In addition, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects may be practiced without these specific details.
In order to solve the technical problem of how to efficiently transfer messages between modules, thereby improving the development speed of an interface and improving the experience of a user of the interface, the embodiments of the present disclosure provide a method for transferring messages between modules. As shown in fig. 1, the message passing method between the modules mainly includes the following steps S101 to S104. Wherein:
step S101: and establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules.
In one embodiment, the UI module in the editing software has a plurality of modules such as a tool bar, a property bar, a display bar and a resource bar. In order to control the message transmission among the plurality of UI modules, a main control unit is established, a plurality of root nodes are stored in the main control unit, and each root node represents one UI module.
Step S102: when the first module changes, a message is sent to the main control unit to control the first root node corresponding to the first module to change.
In order to solve the technical problem that the modules directly perform message transmission logic control, when one module is changed, the module sends a message to the main control unit, namely the change of the module of the main control unit is informed, and after the main control unit receives the message, the root nodes corresponding to the module are controlled to be changed.
Step S103: and transmitting the changed message to a second root node corresponding to the second module so as to change the second root node.
Modules in the UI may have an association relationship, that is, when one module changes, other modules change, and at this time, the main control unit transmits a change message to a root node of the associated module, so that the root node changes.
Step S104: causing a change to a second module based on the change to the second root node.
After the root node changes, the main control unit changes the corresponding module based on the change of the root node. Therefore, the message transmission between the modules is simple, the labor intensity of a programmer is greatly reduced, the development speed of the interface is increased, and the user experience of the interface is improved.
In one embodiment, in a plurality of UI modules, an item is established in a first module, then a resource required by the item is displayed in a second module, a preview of the item is displayed in a third module, attribute configuration of the item is displayed in four modules, when the resource is edited or imported in the second module, a message of the change is transmitted to a main control unit, and the main control unit controls a root node corresponding to the second module to change; the main control unit transmits the changed information to the root nodes corresponding to the third module and the fourth module, so that the root nodes are changed, and the preview of the third module and the corresponding change of the attribute configuration page of the fourth module are realized through the root nodes. An important invention point of the present invention is that the main control unit controls the change of the associated modules according to the needs, but not when adjusting one module, all modules change accordingly, such as the items in the first module, if the resource and attribute configuration needs to be changed, the change of the corresponding root node is controlled, so that the corresponding second and fourth modules change correspondingly. While the third module is unchanged.
In some other embodiments, the above-described methods may implement messaging for multiple modules in other software in a manner similar to messaging in UI modules.
Another embodiment of the present disclosure also provides a method of message passing between modules. As shown in fig. 2, the message passing method between the modules mainly includes the following steps S201 to S205. Wherein:
step S201: and establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules.
In one embodiment, the UI module in the editing software has a plurality of modules such as a tool bar, a property bar, a display bar and a resource bar. In order to control the message transmission among the plurality of UI modules, a main control unit is established, a plurality of root nodes are stored in the main control unit, and each root node represents one UI module.
Step S202: when the first module changes, a message is sent to the main control unit to control the first root node corresponding to the first module to change.
In order to solve the technical problem that the modules directly perform message transmission logic control, when one module is changed, the module sends a message to the main control unit, namely the change of the module of the main control unit is informed, and after the main control unit receives the message, the root nodes corresponding to the module are controlled to be changed.
Step S203: and the main control unit analyzes the change of the first root node to obtain a second root node related to the change.
In order to improve the user experience, that is, it is necessary to determine which modules change along with the changed modules, the association relationship between the root nodes of the modules is analyzed by the main control unit, and a second root node related to the change of the root node of the first module is determined. Therefore, in the following operation, which modules are changed and which are not changed can be determined, so that the user experience is improved.
Step S204: and transmitting the changed message to a second root node corresponding to the second module so as to change the second root node.
Modules in the UI may have an association relationship, that is, when one module changes, other modules change, and at this time, the master control unit transmits a change message to a root node of the associated module, so that the root node changes.
Step S205: causing a change to a second module based on the change to the second root node.
After the root node changes, the main control unit changes the corresponding module based on the change of the root node. Therefore, the message transmission between the modules is simple, the labor intensity of a programmer is greatly reduced, the development speed of the interface is increased, and the user experience of the interface is improved.
In one embodiment, in a plurality of UI modules, an item is established in a first module, then a resource required by the item is displayed in a second module, a preview of the item is displayed in a third module, attribute configuration of the item is displayed in four modules, when the resource is edited or imported in the second module, a message of the change is transmitted to a main control unit, and the main control unit controls a root node corresponding to the second module to change; the main control unit transmits the changed information to the root nodes corresponding to the third module and the fourth module, so that the root nodes are changed, and the preview of the third module and the corresponding change of the attribute configuration page of the fourth module are realized through the root nodes. An important invention point of the present invention is that the main control unit controls the change of the associated modules according to the needs, but not when adjusting one module, all modules change accordingly, such as the items in the first module, if the resource and attribute configuration needs to be changed, the change of the corresponding root node is controlled, so that the corresponding second and fourth modules change correspondingly. While the third module is unchanged.
In one embodiment, the different modules may include: the device comprises a special effect module, a resource module, a display module and an attribute module. For example, in a typical application, the UI of software for creating a special effect includes 4 basic modules, a special effect module for creating a special effect, a resource module for displaying resources required for the special effect, a display module for displaying a preview of the special effect, and an attribute module for displaying an attribute panel for adjusting attributes of the special effect, such as a display position, a display size, a display time, a trigger condition, and the like. By the method, message transmission among the special effect module, the resource module, the display module and the attribute module can be realized, so that development of a user becomes easy, and user experience is improved.
In one embodiment, the main variations of the first module include: selecting a feature in the first module, adding a feature in the first module, deleting a feature in the first module, and/or adjusting an attribute of a feature in the first module, variations of which are described in detail below. This is also a typical variation of the module. The characteristics are generally reflected by data, i.e., the characteristics include related data whose category (e.g., including resource category, display category, and/or attribute category) is a predetermined category. For example, the characteristics are items in the module, and the related data is related data of the items, such as resources required by the items, which are preset, i.e. once the items are determined, the type of the related data required by the items is determined, but the related data can be deleted, such as how many data of the resource type the special effect must include, but can be adjusted.
This embodiment describes the specific operations that change to selecting features in the first module as: when the change is that the feature in the first module is selected, determining a first child node related to the feature in a first root node tree, and selecting the first child node related to the feature; after the first child node related to the feature is selected, determining first data related to the first child node, and determining a second child node of a second root node tree according to the first data; displaying, in a second module corresponding to the second root node, a second feature associated with the second child node. The module is changed into selection, when one special effect is selected, the required resource is displayed on the resource panel, the attribute is displayed on the attribute panel, and if the default special effect exists, the preview of the default special effect can be displayed.
This embodiment describes the specific operations that are changed to add features to the first module as: when the change is to increase the feature in the first module, determining a first root node related to the feature, and establishing a first root node tree related to the feature according to the first root node related to the feature; determining second data related to the features, and establishing a second root node tree of a tree related to the second data according to the second data and a second root node, wherein the second root node tree comprises a second child node related to the second data; displaying, in a second module corresponding to the second root node, a second feature associated with the second child node. The module is changed into an added feature, for example, an effect is added, the required resource is displayed on a resource panel, the attribute is displayed on an attribute panel, and if the default effect exists, a preview of the default effect can be displayed.
This embodiment describes the specific operations that change to delete a feature in the first module as: when the change is to delete the feature in the first module, determining a first root node related to the feature, and deleting a first root node tree related to the feature according to the first root node related to the feature; determining third data related to the features, searching a second root node tree related to the third data, and deleting the second root node tree, wherein the second root node tree comprises a third child node related to the third data; in a second module corresponding to the second root node, deleting a third feature associated with the third child node. . That is, if the module changes to a delete feature, for example, if a resource with a special effect is deleted, the property panel and the preview image corresponding to the resource are deleted.
This embodiment describes the specific operations that change to adjust the features in the first module as: when the change is to adjust the feature in the first module, determining a first root node related to the feature, and adjusting a first root node tree related to the feature according to the first root node related to the feature; determining fourth data related to the features, searching a second root node tree related to the fourth data, and adjusting the second root node tree, wherein the second root node tree comprises a fourth child node related to the fourth data; displaying, in a second module corresponding to the second root node, a fourth feature associated with the fourth child node. I.e. the module is changed to an adjustment, e.g. the position of an attribute, e.g. a special effect, on the attribute panel, the tree of the root node associated with the display is adjusted, by which the display result of the display module is controlled.
It should be clear to a person skilled in the art that the above mentioned corresponding ways are not exhaustive, and that a person skilled in the art may also make simple variations or equivalents on the basis of the above listed ways, which are also intended to be included within the scope of protection of the present disclosure.
In the above, although the steps in the embodiment of the message passing method between the modules are described in the above sequence, it should be clear to those skilled in the art that the steps in the embodiment of the present disclosure are not necessarily performed in the above sequence, and may also be performed in other sequences such as reverse, parallel, and cross, and further, on the basis of the above steps, those skilled in the art may also add other steps, and these obvious modifications or equivalents should also be included in the protection scope of the present disclosure, and are not described herein again.
For convenience of description, only the relevant parts of the embodiments of the present disclosure are shown, and details of the specific techniques are not disclosed, please refer to the embodiments of the method of the present disclosure.
In order to solve the technical problem of how to efficiently transfer messages between modules, so as to improve the development speed of an interface and improve the experience of a user of the interface, an embodiment of the present disclosure provides an inter-module message transfer apparatus, as shown in fig. 3, which includes:
the establishing device 31 is configured to establish a main control unit, where the main control unit stores a plurality of root nodes, and the root nodes correspond to different modules respectively.
In one embodiment, the UI module in the editing software has a plurality of modules such as a tool bar, a property bar, a display bar and a resource bar. In order to control the message transmission among the plurality of UI modules, a main control unit is established, a plurality of root nodes are stored in the main control unit, and each root node represents one UI module.
And the message sending device 32 is configured to send a message to the main control unit when the first module changes, so as to control the first root node corresponding to the first module to change.
In order to solve the technical problem that the modules directly perform message transmission logic control, when one module is changed, the module sends a message to the main control unit, namely the change of the module of the main control unit is informed, and after the main control unit receives the message, the root nodes corresponding to the module are controlled to be changed.
And a message passing unit 33, configured to pass the changed message to the second root node corresponding to the second module, so that the second root node is changed.
Modules in the UI may have an association relationship, that is, when one module changes, other modules change, and at this time, the master control unit transmits a change message to a root node of the associated module, so that the root node changes.
Change means 34 for causing a change to the second module based on the change of the second root node.
After the root node changes, the main control unit changes the corresponding module based on the change of the root node. Therefore, the message transmission between the modules is simple, the labor intensity of a programmer is greatly reduced, the development speed of the interface is increased, and the user experience of the interface is improved.
In one embodiment, in a plurality of UI modules, an item is established in a first module, then a resource required by the item is displayed in a second module, a preview of the item is displayed in a third module, attribute configuration of the item is displayed in four modules, when the resource is edited or imported in the second module, a message of the change is transmitted to a main control unit, and the main control unit controls a root node corresponding to the second module to change; the main control unit transmits the changed information to the root nodes corresponding to the third module and the fourth module, so that the root nodes are changed, and the preview of the third module and the corresponding change of the attribute configuration page of the fourth module are realized through the root nodes. An important invention point of the present invention is that the main control unit controls the change of the associated modules according to the needs, but not when adjusting one module, all modules change accordingly, such as the items in the first module, if the resource and attribute configuration needs to be changed, the change of the corresponding root node is controlled, so that the corresponding second and fourth modules change correspondingly. While the third module is unchanged.
In some other embodiments, the above-described methods may implement messaging for multiple modules in other software in a manner similar to messaging in UI modules.
Another embodiment of the present disclosure also provides an inter-module message passing apparatus. As shown in fig. 4, it includes:
the establishing means 41: the system comprises a main control unit and a plurality of modules, wherein the main control unit is used for establishing the main control unit, the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules.
In one embodiment, the UI module in the editing software has a plurality of modules such as a tool bar, a property bar, a display bar and a resource bar. In order to control the message transmission among the plurality of UI modules, a main control unit is established, a plurality of root nodes are stored in the main control unit, and each root node represents one UI module.
The message transmitting apparatus 42: when the first module changes, a message is sent to the main control unit to control the first root node corresponding to the first module to change.
In order to solve the technical problem that the modules directly perform message transmission logic control, when one module is changed, the module sends a message to the main control unit, namely the change of the module of the main control unit is informed, and after the main control unit receives the message, the root nodes corresponding to the module are controlled to be changed.
The analyzing device 43: and the master control unit is used for analyzing the change of the first root node to obtain a second root node related to the change.
In order to improve the user experience, that is, it is necessary to determine which modules change along with the changed modules, the association relationship between the root nodes of the modules is analyzed by the main control unit, and a second root node related to the change of the root node of the first module is determined. Therefore, in the following operation, which modules are changed and which are not changed can be determined, so that the user experience is improved.
And a message passing means 44 for passing the changed message to a second root node corresponding to the second module to cause the second root node to change.
Modules in the UI may have an association relationship, that is, when one module changes, other modules change, and at this time, the master control unit transmits a change message to a root node of the associated module, so that the root node changes.
The changing device 45: and means for causing a change to a second module based on the change to the second root node.
After the root node changes, the main control unit changes the corresponding module based on the change of the root node. Therefore, the message transmission between the modules is simple, the labor intensity of a programmer is greatly reduced, the development speed of the interface is increased, and the user experience of the interface is improved.
In one embodiment, in a plurality of UI modules, an item is established in a first module, then a resource required by the item is displayed in a second module, a preview of the item is displayed in a third module, attribute configuration of the item is displayed in four modules, when the resource is edited or imported in the second module, a message of the change is transmitted to a main control unit, and the main control unit controls a root node corresponding to the second module to change; the main control unit transmits the changed information to the root nodes corresponding to the third module and the fourth module, so that the root nodes are changed, and the preview of the third module and the corresponding change of the attribute configuration page of the fourth module are realized through the root nodes. An important invention point of the present invention is that the main control unit controls the change of the associated modules according to the needs, but not when adjusting one module, all modules change accordingly, such as the items in the first module, if the resource and attribute configuration needs to be changed, the change of the corresponding root node is controlled, so that the corresponding second and fourth modules change correspondingly. While the third module is unchanged.
In one embodiment, the different modules may include: the device comprises a special effect module, a resource module, a display module and an attribute module. For example, in a typical application, the UI of software for creating a special effect includes 4 basic modules, a special effect module for creating a special effect, a resource module for displaying resources required for the special effect, a display module for displaying a preview of the special effect, and an attribute module for displaying an attribute panel for adjusting attributes of the special effect, such as a display position, a display size, a display time, a trigger condition, and the like. By the method, message transmission among the special effect module, the resource module, the display module and the attribute module can be realized, so that development of a user becomes easy, and user experience is improved.
In one embodiment, the main variations of the first module include: selecting a feature in the first module, adding a feature in the first module, deleting a feature in the first module, and/or adjusting an attribute of a feature in the first module, variations of which are described in detail below. This is also a typical variation of the module. The characteristics are generally reflected by data, i.e., the characteristics include related data whose category (e.g., including resource category, display category, and/or attribute category) is a predetermined category. For example, the characteristics are items in the module, and the related data is related data of the items, such as resources required by the items, which are preset, i.e. once the items are determined, the type of the related data required by the items is determined, but the related data can be deleted, such as how many data of the resource type the special effect must include, but can be adjusted.
This embodiment describes the specific operations that change to selecting features in the first module as: when the change is that the feature in the first module is selected, determining a first child node related to the feature in a first root node tree, and selecting the first child node related to the feature; after the first child node related to the feature is selected, determining first data related to the first child node, and determining a second child node of a second root node tree according to the first data; displaying, in a second module corresponding to the second root node, a second feature associated with the second child node. The module is changed into selection, when one special effect is selected, the required resource is displayed on the resource panel, the attribute is displayed on the attribute panel, and if the default special effect exists, the preview of the default special effect can be displayed.
This embodiment describes the specific operations that are changed to add features to the first module as: when the change is to increase the feature in the first module, determining a first root node related to the feature, and establishing a first root node tree related to the feature according to the first root node related to the feature; determining second data related to the features, and establishing a second root node tree of a tree related to the second data according to the second data and a second root node, wherein the second root node tree comprises a second child node related to the second data; displaying, in a second module corresponding to the second root node, a second feature associated with the second child node. The module is changed into an added feature, for example, an effect is added, the required resource is displayed on a resource panel, the attribute is displayed on an attribute panel, and if the default effect exists, a preview of the default effect can be displayed.
This embodiment describes the specific operations that change to delete a feature in the first module as: when the change is to delete the feature in the first module, determining a first root node related to the feature, and deleting a first root node tree related to the feature according to the first root node related to the feature; determining third data related to the features, searching a second root node tree related to the third data, and deleting the second root node tree, wherein the second root node tree comprises a third child node related to the third data; in a second module corresponding to the second root node, deleting a third feature associated with the third child node. . That is, if the module changes to a delete feature, for example, if a resource with a special effect is deleted, the property panel and the preview image corresponding to the resource are deleted.
This embodiment describes the specific operations that change to adjust the features in the first module as: when the change is to adjust the feature in the first module, determining a first root node related to the feature, and adjusting a first root node tree related to the feature according to the first root node related to the feature; determining fourth data related to the features, searching a second root node tree related to the fourth data, and adjusting the second root node tree, wherein the second root node tree comprises a fourth child node related to the fourth data; displaying, in a second module corresponding to the second root node, a fourth feature associated with the fourth child node. I.e. the module is changed to an adjustment, e.g. the position of an attribute, e.g. a special effect, on the attribute panel, the tree of the root node associated with the display is adjusted, by which the display result of the display module is controlled.
Fig. 5 is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure. As shown in fig. 5, an electronic device 50 according to an embodiment of the present disclosure includes a memory 51 and a processor 52.
The memory 51 is used to store non-transitory computer readable instructions. In particular, memory 51 may include one or more computer program products that may include various forms of computer-readable storage media, such as volatile memory and/or non-volatile memory. The volatile memory may include, for example, Random Access Memory (RAM), cache memory (cache), and/or the like. The non-volatile memory may include, for example, Read Only Memory (ROM), hard disk, flash memory, etc.
The processor 52 may be a Central Processing Unit (CPU) or other form of processing unit having data processing capabilities and/or instruction execution capabilities, and may control other components in the electronic device 50 to perform desired functions. In one embodiment of the present disclosure, the processor 52 is configured to execute the computer readable instructions stored in the memory 51, so that the electronic device 50 performs all or part of the foregoing steps of the inter-module message passing method according to the embodiments of the present disclosure.
Those skilled in the art should understand that, in order to solve the technical problem of how to obtain a good user experience, the present embodiment may also include well-known structures such as a communication bus, an interface, and the like, and these well-known structures should also be included in the protection scope of the present disclosure.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Fig. 6 is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. As shown in fig. 6, a computer-readable storage medium 60, having non-transitory computer-readable instructions 61 stored thereon, in accordance with an embodiment of the present disclosure. The non-transitory computer readable instructions 61, when executed by a processor, perform all or a portion of the steps of the inter-module messaging methods of the embodiments of the disclosure previously described.
The computer-readable storage medium 60 includes, but is not limited to: optical storage media (e.g., CD-ROMs and DVDs), magneto-optical storage media (e.g., MOs), magnetic storage media (e.g., magnetic tapes or removable disks), media with built-in rewritable non-volatile memory (e.g., memory cards), and media with built-in ROMs (e.g., ROM cartridges).
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
Various embodiments of the inter-module messaging methods presented in this disclosure may be implemented using a computer-readable medium such as computer software, hardware, or any combination thereof. For a hardware implementation, various embodiments of the method for automatically generating an interface proposed by the present disclosure may be implemented by using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, and an electronic unit designed to perform the functions described herein.
For the detailed description of the present embodiment, reference may be made to the corresponding descriptions in the foregoing embodiments, which are not repeated herein.
The foregoing describes the general principles of the present disclosure in conjunction with specific embodiments, however, it is noted that the advantages, effects, etc. mentioned in the present disclosure are merely examples and are not limiting, and they should not be considered essential to the various embodiments of the present disclosure. Furthermore, the foregoing disclosure of specific details is for the purpose of illustration and description and is not intended to be limiting, since the disclosure is not intended to be limited to the specific details so described.
The block diagrams of devices, apparatuses, systems referred to in this disclosure are only given as illustrative examples and are not intended to require or imply that the connections, arrangements, configurations, etc. must be made in the manner shown in the block diagrams. These devices, apparatuses, devices, systems may be connected, arranged, configured in any manner, as will be appreciated by those skilled in the art. Words such as "including," "comprising," "having," and the like are open-ended words that mean "including, but not limited to," and are used interchangeably therewith. The words "or" and "as used herein mean, and are used interchangeably with, the word" and/or, "unless the context clearly dictates otherwise. The word "such as" is used herein to mean, and is used interchangeably with, the phrase "such as but not limited to".
Also, as used herein, "or" as used in a list of items beginning with "at least one" indicates a separate list, such that, for example, a list of "A, B or at least one of C" means A or B or C, or AB or AC or BC, or ABC (i.e., A and B and C). Furthermore, the word "exemplary" does not mean that the described example is preferred or better than other examples.
It is also noted that in the systems and methods of the present disclosure, components or steps may be decomposed and/or re-combined. These decompositions and/or recombinations are to be considered equivalents of the present disclosure.
Various changes, substitutions and alterations to the techniques described herein may be made without departing from the techniques of the teachings as defined by the appended claims. Moreover, the scope of the claims of the present disclosure is not limited to the particular aspects of the process, machine, manufacture, composition of matter, means, methods and acts described above. Processes, machines, manufacture, compositions of matter, means, methods, or acts, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding aspects described herein may be utilized. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or acts.
The previous description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other aspects without departing from the scope of the disclosure. Thus, the present disclosure is not intended to be limited to the aspects shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
The foregoing description has been presented for purposes of illustration and description. Furthermore, this description is not intended to limit embodiments of the disclosure to the form disclosed herein. While a number of example aspects and embodiments have been discussed above, those of skill in the art will recognize certain variations, modifications, alterations, additions and sub-combinations thereof.
Claims (12)
1. A method for message passing between modules, comprising:
establishing a main control unit, wherein the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules; wherein the plurality of root nodes have an incidence relation therebetween; wherein the module is a module in an interface;
when the first module changes, sending a message to a main control unit to control a first root node corresponding to the first module to change;
the main control unit analyzes the change of the first root node to obtain a second root node related to the change;
passing the changed message to the second root node corresponding to a second module to cause the second root node to change; wherein the second root node is an associated root node of the first root node;
causing a change to a second module based on the change to the second root node.
2. The method for message passing between modules of claim 1, wherein the different modules comprise:
the device comprises a special effect module, a resource module, a display module and an attribute module.
3. The method of message passing between modules of claim 1, wherein the first module is changed, comprising:
selecting a feature in the first module, adding a feature in the first module, deleting a feature in the first module, and/or adjusting an attribute of a feature in the first module.
4. The method for message passing between modules of claim 3, wherein:
the characteristics comprise related data, and the type of the related data is preset.
5. The method for message passing between modules of claim 4, wherein:
the category of the related data comprises a resource category, a display category and/or an attribute category.
6. The method for message passing between modules of claim 3, wherein:
when the change is that the feature in the first module is selected, determining a first child node related to the feature in a first root node tree, and selecting the first child node related to the feature;
after the first child node related to the feature is selected, determining first data related to the first child node, and determining a second child node of a second root node tree according to the first data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
7. The method for message passing between modules of claim 3, wherein:
when the change is to increase the feature in the first module, determining a first root node related to the feature, and establishing a first root node tree related to the feature according to the first root node related to the feature;
determining second data related to the features, and establishing a second root node tree related to the second data according to the second data and a second root node, wherein the second root node tree comprises a second child node related to the second data;
displaying, in a second module corresponding to the second root node, a second feature associated with the second child node.
8. The method for message passing between modules of claim 3, wherein:
when the change is to delete the feature in the first module, determining a first root node related to the feature, and deleting a first root node tree related to the feature according to the first root node related to the feature;
determining third data related to the features, searching a second root node tree related to the third data, and deleting the second root node tree, wherein the second root node tree comprises a third child node related to the third data;
in a second module corresponding to the second root node, deleting a third feature associated with the third child node.
9. The method for message passing between modules of claim 3, wherein:
when the change is to adjust the feature in the first module, determining a first root node related to the feature, and adjusting a first root node tree related to the feature according to the first root node related to the feature;
determining fourth data related to the features, searching a second root node tree related to the fourth data, and adjusting the second root node tree, wherein the second root node tree comprises a fourth child node related to the fourth data;
displaying, in a second module corresponding to the second root node, a fourth feature associated with the fourth child node.
10. An apparatus for message passing between modules, comprising:
the system comprises a building device, a control device and a control device, wherein the building device is used for building a main control unit, the main control unit stores a plurality of root nodes, and the root nodes respectively correspond to different modules; wherein the plurality of root nodes have an incidence relation therebetween; wherein the module is a module in an interface;
the message sending device is used for sending a message to the main control unit when the first module changes and controlling the first root node corresponding to the first module to change; the main control unit analyzes the change of the first root node to obtain a second root node related to the change;
message passing means for passing the changed message to the second root node corresponding to a second module to cause the second root node to change;
means for causing a change to the second module based on the change to the second root node.
11. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method for message passing between modules as claimed in any of claims 1 to 9.
12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method for message passing between modules according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810733104.1A CN108958954B (en) | 2018-07-05 | 2018-07-05 | Method and device for message transmission between modules, electronic equipment and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810733104.1A CN108958954B (en) | 2018-07-05 | 2018-07-05 | Method and device for message transmission between modules, electronic equipment and computer readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108958954A CN108958954A (en) | 2018-12-07 |
CN108958954B true CN108958954B (en) | 2021-05-25 |
Family
ID=64486063
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810733104.1A Active CN108958954B (en) | 2018-07-05 | 2018-07-05 | Method and device for message transmission between modules, electronic equipment and computer readable medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108958954B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156488A (en) * | 2014-08-29 | 2014-11-19 | 小米科技有限责任公司 | Webpage change detection method and device |
CN106302008A (en) * | 2016-08-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Data-updating method and device |
CN107085519A (en) * | 2017-05-04 | 2017-08-22 | 网易(杭州)网络有限公司 | Behavior tree debugging processing method, device, system, storage medium and processor |
CN107153606A (en) * | 2016-03-04 | 2017-09-12 | 郭德贵 | A kind of program analyzes process visualization method and system |
CN107562459A (en) * | 2017-08-29 | 2018-01-09 | 上海雪鲤鱼计算机科技有限公司 | Management system, interface generation/display/operation/display methods, end-of-medium |
CN107608675A (en) * | 2017-09-27 | 2018-01-19 | 微景天下(北京)科技有限公司 | Cross-platform front end development system and method based on virtual document object model |
CN107656759A (en) * | 2017-09-04 | 2018-02-02 | 口碑(上海)信息技术有限公司 | A kind of rendering intent and device for user interface |
-
2018
- 2018-07-05 CN CN201810733104.1A patent/CN108958954B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104156488A (en) * | 2014-08-29 | 2014-11-19 | 小米科技有限责任公司 | Webpage change detection method and device |
CN107153606A (en) * | 2016-03-04 | 2017-09-12 | 郭德贵 | A kind of program analyzes process visualization method and system |
CN106302008A (en) * | 2016-08-05 | 2017-01-04 | 腾讯科技(深圳)有限公司 | Data-updating method and device |
CN107085519A (en) * | 2017-05-04 | 2017-08-22 | 网易(杭州)网络有限公司 | Behavior tree debugging processing method, device, system, storage medium and processor |
CN107562459A (en) * | 2017-08-29 | 2018-01-09 | 上海雪鲤鱼计算机科技有限公司 | Management system, interface generation/display/operation/display methods, end-of-medium |
CN107656759A (en) * | 2017-09-04 | 2018-02-02 | 口碑(上海)信息技术有限公司 | A kind of rendering intent and device for user interface |
CN107608675A (en) * | 2017-09-27 | 2018-01-19 | 微景天下(北京)科技有限公司 | Cross-platform front end development system and method based on virtual document object model |
Also Published As
Publication number | Publication date |
---|---|
CN108958954A (en) | 2018-12-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6986186B2 (en) | Visualization editing methods, devices, devices and storage media | |
CN107704576B (en) | Data display optimization method and device, terminal equipment and storage medium | |
US20190197068A1 (en) | Page rendering method, device, and data storage medium | |
CN106339226B (en) | A kind of methods of exhibiting and page presentation device of Webpage | |
CN110058856A (en) | Page configuration method and device | |
CN109101304A (en) | Automatic generation method, device, electronic equipment and the computer-readable medium at interface | |
US10372783B2 (en) | Persisting the state of visual control elements in uniform resource locator (URL)-generated web pages | |
CN111026387B (en) | VPLC configuration method and device of industrial server and readable storage medium | |
CN104572668B (en) | Method and apparatus based on multiple pattern file generated Merge Styles files | |
CN107122175B (en) | Interface creating method and device | |
CN108038212B (en) | Data interaction method, device, system, equipment and storage medium | |
US11733973B2 (en) | Interactive graphic design system to enable creation and use of variant component sets for interactive objects | |
CN103428251A (en) | Download task allocation method and device | |
CN106909281A (en) | One kind application inner boundary changing method and device | |
CN104881310A (en) | Method and device for configuring embedded system | |
US8140991B2 (en) | Drag and drop rule topology | |
CN112527288A (en) | Visual system prototype design method, system and storage medium capable of generating codes | |
CN104503868B (en) | Method of data synchronization, device and system | |
CN108958954B (en) | Method and device for message transmission between modules, electronic equipment and computer readable medium | |
CN111506306A (en) | Method and device for compiling Ansible script and electronic equipment | |
KR102151364B1 (en) | Animation creation method and device | |
CN113448569A (en) | Site page processing system, method, equipment and storage medium | |
CN105357289A (en) | Configuration method of router and generation method and system of software mirror image document | |
CN110311826B (en) | Network equipment configuration method and device | |
CN113436330A (en) | Area object generation method and device, electronic equipment and readable 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP03 | Change of name, title or address |
Address after: 2nd Floor, Building 4, No. 18 North Third Ring West Road, Haidian District, Beijing, 2022 Patentee after: Tiktok Technology Co.,Ltd. Country or region after: China Address before: 100080 408, 4th floor, 51 Zhichun Road, Haidian District, Beijing Patentee before: BEIJING MICROLIVE VISION TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |