[go: nahoru, domu]

CN111078196A - Message transmission method, device, equipment and storage medium based on MVC architecture - Google Patents

Message transmission method, device, equipment and storage medium based on MVC architecture Download PDF

Info

Publication number
CN111078196A
CN111078196A CN201811230451.9A CN201811230451A CN111078196A CN 111078196 A CN111078196 A CN 111078196A CN 201811230451 A CN201811230451 A CN 201811230451A CN 111078196 A CN111078196 A CN 111078196A
Authority
CN
China
Prior art keywords
node
signal data
determining
initiating
attribute
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
CN201811230451.9A
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.)
SF Technology Co Ltd
SF Tech Co Ltd
Original Assignee
SF 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 SF Technology Co Ltd filed Critical SF Technology Co Ltd
Priority to CN201811230451.9A priority Critical patent/CN111078196A/en
Publication of CN111078196A publication Critical patent/CN111078196A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a message transmission method, a device, equipment and a storage medium based on an MVC architecture, wherein the method comprises the following steps: generating signal data when receiving a trigger instruction of a user for an initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node; determining a next response node of the signal data according to the node attribute of the initiating node; sending the signal data to the next responding node. The method can automatically respond to the processing signal, realizes the automatic transmission of the cross-layer and cross-module messages, and greatly improves the convenience of message transmission.

Description

Message transmission method, device, equipment and storage medium based on MVC architecture
Technical Field
The present invention relates generally to the field of internet application technologies, and in particular, to a message transmission method, apparatus, device, and storage medium based on an MVC architecture.
Background
With the rapid development of internet technology, more and more interactive software is designed by adopting an MVC (Model-View-Controller, Model-View-Controller for short) architecture, wherein a Model layer is used for storing data and the state of an application program, a View layer is used for defining a user interface layer, and a Controller layer is used for processing user input to modify the data and the state.
When some software comprises a plurality of modules, and each module is implemented by adopting an MVC architecture, different layers of different modules need to communicate through a message passing party.
In the traditional technology, the message transmission among different levels of different modules needs to be realized by compiling a plurality of sets of codes one by one, which causes great workload of technical personnel, not only needs to consume a great deal of time, but also has low realization efficiency and low flexibility in the message transmission process.
Disclosure of Invention
In view of the above-mentioned drawbacks and deficiencies in the prior art, it is desirable to provide a message delivery method, apparatus, device and storage medium based on the MVC architecture.
In a first aspect, the present invention provides a message passing method based on an MVC architecture, including:
generating signal data when receiving a trigger instruction of a user for an initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node;
determining a next response node of the signal data according to the node attribute of the initiating node;
sending the signal data to the next responding node.
In one embodiment, before determining the next responding node of the signal data, the method further comprises:
assigning the attribute information of the signal data; wherein the attribute information includes one or a combination of: a first field for representing whether the signal data is finished, a second field for representing whether the signal data reaches the last responding node, and a third field for representing the jumping times of the signal data.
In one embodiment, the determining a next responding node of the signal data according to the node attribute of the initiating node includes:
judging whether the initiating node can respond to the signal data or not according to the attribute information of the signal data;
and when the initiating node is judged to be capable of responding to the signal data, determining the next responding node of the signal data according to the node attribute of the initiating node.
In one embodiment, the attribute information includes the first field;
the determining, according to the attribute information of the signal data, whether the originating node can respond to the signal data includes:
judging whether the signal data is finished or not according to the first field;
and when the signal data is judged not to be finished, determining that the initiating node can respond to the signal data.
In one embodiment, the attribute information includes the second field;
the determining, according to the attribute information of the signal data, whether the originating node can respond to the signal data includes:
judging whether the signal data reaches the last response node or not according to the second field;
and when the signal data is judged not to reach the last responding node, determining that the initiating node can respond to the signal data.
In one embodiment, the determining a next responding node of the signal data according to the node attribute of the initiating node includes:
judging whether the node attribute contains a preset next response node or not;
when the judgment result is yes, determining a preset next response node as the next response node of the signal data;
if the judgment result is negative, acquiring the node type from the node attribute; and determining a default response node corresponding to the node type as the next response node of the signal data according to a preset corresponding relationship between the node type and the default response node.
In one embodiment, the correspondence relationship includes:
the node type is a model layer, and the corresponding default response node is empty;
the node type is a view layer or a controller layer, and the corresponding default response node is a node on the upper layer of the node.
In a second aspect, an embodiment of the present application provides a message passing apparatus based on an MVC architecture, where the apparatus includes:
the generating module is used for generating signal data when receiving a triggering instruction of a user for the initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node;
a determining module, configured to determine a next response node of the signal data according to the node attribute of the initiating node;
a sending module, configured to send the signal data to the next response node.
In a third aspect, an embodiment of the present application provides a computer device, including a memory and a processor, where the memory stores a computer program, and the processor implements the MVC architecture-based message delivery method described in any one of the above when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the MVC architecture-based message delivery method described in any one of the above.
When a trigger instruction of a user for an initiating node is received, signal data is generated, a next response node of the signal data is determined according to a node attribute of the initiating node, and then the signal data is sent to the next response node. By determining the node attribute of the initiating node, the next responding node of the signal data can be automatically determined in the transmission process of the signal data from the node to the next responding node, and the message is automatically sent to the next responding node, so that the transmission speed of the message is improved to a great extent, and the automatic response of the signal is realized.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
fig. 1 is a schematic flowchart of a message delivery method based on an MVC architecture according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention;
fig. 3 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention;
fig. 4 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention;
fig. 5 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention;
fig. 6 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to another embodiment of the present invention;
fig. 8 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to another embodiment of the present invention;
fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
As mentioned in the background art, software can be divided into a plurality of main modules according to functions, each main module can be divided into a model layer, a view layer and a controller layer, generally, one main module includes one or more sub-function modules, each sub-function module is also divided into a model layer, a view layer and a controller layer, and communication is required between the sub-function modules and the main module, between each sub-function module and between different levels; in the prior art, different transmission modes are used when different levels of different modules transmit messages, for example, messages are transmitted between a view layer and a view layer in a response chain mode, messages are transmitted between the view layer and a controller layer in a non-response chain mode, and messages are transmitted between the model layer and the controller layer in a direct calling mode. This requires technicians to write different codes for different delivery methods, which results in a large workload for users, a large amount of time consumption, low efficiency of implementation, and low flexibility of message delivery process.
Based on the above-mentioned defects, embodiments of the present invention provide a message transmission method based on an MVC architecture, which can automatically determine a next response node after generating signal data, so that the next response node can automatically respond to the signal data.
The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a flowchart illustrating a message passing method based on an MVC architecture according to an embodiment of the present invention, where the embodiment relates to a method for generating signal data and sending the signal data to a next responding node when receiving a trigger instruction of a user for an initiating node. As shown in fig. 1, the method includes:
s101, generating signal data when receiving a trigger instruction of a user for an initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node.
Specifically, the trigger instruction for the initiating node may be a click button instruction of a user, may be an option selection instruction, may be a pull-down refresh instruction, and may be a tab switching instruction, and when the computer device receives the trigger instruction for the initiating node from the user, signal data is generated, where the signal data may include an image, sound, text, and the like.
And S102, determining a next response node of the signal data according to the node attribute of the initiating node.
Specifically, the node attribute may include a preset next response node that transmits the signal data, and the next response node of the signal data may be determined by analyzing the node attribute. If the node attribute does not include the next response node for transmitting the signal data, the node type may be further obtained from the node attribute, and the corresponding default response node is determined as the next response node for the signal data according to the preset correspondence between the node type and the default response node.
Optionally, the next response node may be any one of a view layer node, a model layer node, and a controller layer node. The view layer nodes can provide a user operation interface, the model layer nodes are data or information which is responsible for the operation required by the program, and the controller layer nodes are responsible for selecting the data in the model layer nodes according to instructions input by a user from the view layer nodes and then performing corresponding operation on the data to generate a final result. Generally, in a message transmission process, signal data are transmitted to a controller layer node through a model layer node and then transmitted to a view layer node, the three layers of nodes are closely connected and are mutually independent, the change in each layer of nodes does not affect other layers of nodes, each layer of nodes externally provides an interface for the previous layer of nodes to call, and when all nodes are subjected to response verification, the nodes are transmitted to the next response node after the previous node is completed, so that software can be modularized, other layers do not need to be modified when the appearance is modified or data are changed, and software maintenance and upgrading are greatly facilitated.
And S103, sending the signal data to the next response node.
Specifically, after the next responding node receives the signal data, the next responding node of the next responding node is determined according to the message transmission method based on the MVC architecture provided in this embodiment, and the signal data is transmitted to the next responding node of the next responding node.
In the message transmission method based on the MVC architecture provided in this embodiment, when a trigger instruction of a user for an originating node is received, signal data is generated, a next response node of the signal data is determined according to a node attribute of the originating node, and then the signal data is sent to the next response node. By determining the node attribute of the initiating node, the next responding node of the signal data can be automatically determined in the transmission process of the signal data from the initiating node to the next responding node, and the message is automatically sent to the next responding node, so that the transmission speed of the message is improved to a great extent, and the automatic response of the signal is realized.
Fig. 2 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention. The present embodiment relates to a method for determining a next responding node of signal data according to a node attribute of an originating node. As shown in fig. 2, the method includes:
s201, judging whether the initiating node can respond to the signal data according to the attribute information of the signal data.
Specifically, before determining the next responding node of the signal data in step S102, the method may further include: assigning attribute information of the signal data, wherein the attribute information may include: the node comprises a first field for representing whether the signal is ended or not, a second field for representing whether the signal reaches the last response node or not, a third field for representing the number of hops of the signal data, the name of the node sending the signal data, the name of the signal data, a custom signal parameter, a return value and the like, wherein the number of hops of the signal data is used for recording the number of times of transmission of the signal data, the sender of the signal represents the node where the signal data is transmitted, and the name of the signal represents the name of the signal data, for example, the sender of the signal can be assigned as viewA or viewB, and the name of the signal can be assigned as name 1.
For example, when the user trigger event is clicking a button such as "beijing", "shenzhen", and the like, and corresponding weather information occurs, then the signal name may be name1 and name2, the custom signal parameter may be a parameter related to the event content such as "beijing", "shenzhen", "weather", and the like, and the return value is related information of returning the beijing and shenzhen weather.
As another embodiment of S201, refer to fig. 3, where fig. 3 relates to a method for determining whether an originating node can respond to signal data according to attribute information of the signal data. As shown in fig. 3, the method includes:
s301, judging whether the signal data is finished or not according to the first field.
S302, when the signal data is judged not to be finished, the initiating node is determined to be capable of responding to the signal data.
Specifically, after the attribute information of the signal data is assigned, whether the signal data is ended may be determined according to a first field that represents whether the signal is ended, for example, the first field may be 0 or 1, where 1 may indicate that the signal data is ended, and 0 may indicate that the signal data is not ended, and whether the signal data is ended is determined by determining the first field value.
It should be noted that when it is determined that the signal data is not ended, it is determined that the initiating node can respond to the signal data, and the initiating node may be a view layer node, a model layer node, or a controller layer node. Whether the signal data is finished or not can be accurately judged through the first field of the signal data attribute information, so that whether the signal data can be continuously transmitted or not is further judged, invalid transmission of the signal data is avoided, and the efficiency of signal data transmission is improved.
As another embodiment of S201, refer to fig. 4, where fig. 4 relates to a method for determining whether an originating node can respond to signal data according to attribute information of the signal data. As shown in fig. 4, the method includes:
s401, judging whether the signal data reaches the last response node or not according to the second field.
S402, when the signal data is judged not to reach the last responding node, the initiating node is determined to be capable of responding to the signal data.
Specifically, the second field is used to indicate whether the signal data reaches the last responding node, for example, the second field may be 0 or 1, where 1 may indicate that the signal reaches the last responding node, 0 may indicate that the signal does not reach the last responding node, and whether the signal reaches the last responding node is determined by determining the second field value.
It should be noted that, when it is determined that the signal data does not reach the last responding node according to the second field, it is determined that the initiating node can respond to the signal data. The second field is arranged in the attribute information of the signal data, so that the starting node can accurately judge that the signal data can be responded, the efficiency of signal data transmission is further improved, and the automatic response of the signal data is ensured.
S202, when the node is judged to be capable of responding to the signal data, determining a next responding node of the signal data according to the node attribute of the initiating node.
Specifically, when the signal data is determined not to be ended according to the first field, that is, when the node can respond to the signal data, a next responding node of the signal data is determined according to the node attribute.
In the MVC architecture-based message transmission method provided in the embodiment of the present invention, when it is determined that a signal is not ended and does not reach a last response node through a first field and a second field in attribute information of signal data, it is determined that an originating node can respond to the signal data, and a next response node of the signal data is determined according to a node attribute of the originating node. The first field and the second field are used as reference factors for determining whether the initiating node can respond to the signal data, so that whether the initiating node can respond to the signal data can be accurately judged, invalid transmission of the signal data is avoided, automatic response of the signal data at the next responding node is realized, and the transmission efficiency of the signal data is improved to a great extent.
Fig. 5 is a flowchart illustrating a message passing method based on an MVC architecture according to another embodiment of the present invention. The present embodiment relates to a method for determining a next responding node of signal data according to a node attribute of an originating node. As shown in fig. 5, the method includes:
s501, judging whether the node attribute contains a preset next response node.
Optionally, the node attribute may include preset next response node information, a node type, and other parameters of the node, and when it is determined that the initiating node can respond to the signal data, whether the node attribute includes a preset next response node may be determined by analyzing the node attribute of the initiating node.
And S502, when the judgment result is yes, determining a preset next response node as a next response node of the signal data.
S503, when the judgment result is negative, acquiring the node type from the node attribute; and determining the default response node corresponding to the node type as the next response node of the signal data according to the preset corresponding relation between the node type and the default response node.
Specifically, when the node attribute is determined to include the preset next response node, the preset next response node is acquired, and the preset response node is used as the next response node of the signal data.
For example, when the initiating node is a viewA, and a next responding node is preset in a node attribute of the initiating node viewA as a ControllerB, it may be determined that the initiating node viewA includes the preset next responding node ControllerB, and the ControllerB is a next responding node of the viewA.
And when the node attribute is judged not to contain the preset next response node, acquiring the node type, determining the default response node according to the corresponding relation between the preset node type and the default response node, and determining the default response node as the next response node, wherein the node type can be a model layer, a view layer or a controller layer.
When the node type is the model layer, the corresponding default response node is empty; when the node type is the view layer, automatically searching a response node of the nextResponder attribute, wherein the node of the previous layer is the response node of the nextResponder attribute, namely the default response node is the node of the nextResponder attribute; when the node type is the controller layer, the corresponding default response node is the node on the previous layer of the node, and optionally, the node on the previous layer may be the master controller.
It should be noted that, in the prior art, a general signal cannot be transmitted to a model layer and is directly processed in a controller layer, but in the embodiment of the present invention, when a certain object indicating a model displayed by a system is a next response node, that is, no matter a model layer or a controller layer, messages can be transmitted between each hierarchy, which overcomes the limitation of message transmission between the conventional hierarchies, and when one view layer corresponds to multiple controller layers or multiple model layers, as long as a next response node is found and the signal data can be responded, messages can be automatically transmitted in a response manner, so that multi-object response is realized.
The MVC architecture-based message transmission method provided in the embodiment of the present invention determines, by determining whether a node attribute includes a preset next response node, a next response node of signal data according to a determination result, or a default response node corresponding to a node type according to a node type in the node attribute. The next response node of the signal data can be accurately determined through the node attributes of the nodes, and when the next response node is not preset, the default response node is automatically obtained, so that the automatic response and the multi-object response of the signal data are realized.
Fig. 6 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to an embodiment of the present invention. As shown in fig. 6, the apparatus may implement the method shown in fig. 1, and the apparatus may include:
a generating module 10, configured to generate signal data when receiving a trigger instruction of a user for an initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node;
a determining module 20, configured to determine a next response node of the signal data according to the node attribute of the initiating node;
a sending module 30, configured to send the signal data to the next responding node.
Fig. 7 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to an embodiment of the present invention. As shown in fig. 7, preferably, the apparatus further comprises an assigning module 40:
an assignment module 40, configured to assign an attribute information of the signal data; wherein the attribute information includes one or a combination of: a first field for representing whether the signal data is finished, a second field for representing whether the signal data reaches the last responding node, and a third field for representing the jumping times of the signal data.
Preferably, the determining module 20 includes:
a first judging unit 201, configured to judge whether the originating node can respond to the signal data according to attribute information of the signal data;
a first determining unit 202, configured to determine, according to a node attribute of the originating node, the next responding node of the signal data when it is determined that the originating node can respond to the signal data.
The first determining unit 201 is specifically configured to determine whether the signal data is ended according to the first field; and when the signal data is judged not to be finished, determining that the initiating node can respond to the signal data.
The first determining unit 201 is specifically configured to determine whether the signal data reaches the last response node according to the second field; and when the signal data is judged not to reach the last responding node, determining that the initiating node can respond to the signal data.
Fig. 8 is a schematic structural diagram of a message passing apparatus based on an MVC architecture according to an embodiment of the present invention. As shown in fig. 8, preferably, the determining module 20 includes:
a second judging unit 203, configured to judge whether the node attribute includes a preset next response node;
a second determining unit 204, configured to determine a preset next response node as a next response node of the signal data when the determination result is yes;
a third determining unit 205, configured to, when the determination result is negative, obtain the node type from the node attribute; and determining a default response node corresponding to the node type as a next response node of the signal data according to a preset corresponding relation between the node type and the default response node. Wherein, the corresponding relation includes: the node type is a model layer, and the corresponding default response node is empty; the node type is a view layer, and the corresponding default response node is a response node with a nextResponder attribute; the node type is a controller layer, and the corresponding default response node is a node on the upper layer of the node.
The MVC architecture-based message passing apparatus provided in this embodiment may execute the above-described method embodiments, and its implementation principle and technical effect are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present invention. As shown in fig. 9, a schematic structural diagram of a computer system 900 suitable for implementing a terminal device or a server according to an embodiment of the present application is shown.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 601, ROM 902, and RAM 903 are connected to each other through a bus 904. An input/output (I/O) interface 906 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. A drive 910 is also connected to the I/O interface 906 as needed. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, the processes described above with reference to fig. 1-5 may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing the MVC architecture-based messaging method of fig. 1-5. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software or hardware. The described units or modules may also be provided in a processor, and may be described as: a processor includes a generation module, a determination module, and a transmission module. Where the names of these units or modules do not in some cases constitute a limitation of the unit or module itself, for example, the generating module may also be described as "for generating signal data when receiving a triggering instruction of a user for a node; the nodes are any one of model layer nodes, view layer nodes and controller layer nodes.
As another aspect, the present application also provides a computer-readable storage medium, which may be the computer-readable storage medium included in the foregoing device in the foregoing embodiment; or it may be a separate computer readable storage medium not incorporated into the device. The computer readable storage medium stores one or more programs for use by one or more processors in performing the MVC architecture based messaging methods described herein.
In summary, according to the message transmission method, device, equipment and storage medium based on the MVC architecture provided by the embodiments of the present invention, when a trigger instruction of a user for an originating node is received, signal data is generated, a next response node of the signal data is determined according to a node attribute of the originating node, and then the signal data is sent to the next response node. By determining the node attribute of the initiating node, the next responding node of the signal data can be automatically determined in the transmission process of the signal data from the initiating node to the next responding node, and the message is automatically sent to the next responding node, so that the transmission speed of the message is improved to a great extent, and the automatic response of the signal is realized.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by a person skilled in the art that the scope of the invention as referred to in the present application is not limited to the embodiments with a specific combination of the above-mentioned features, but also covers other embodiments with any combination of the above-mentioned features or their equivalents without departing from the inventive concept. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (10)

1. A message transmission method based on MVC architecture is characterized by comprising the following steps:
generating signal data when receiving a trigger instruction of a user for an initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node;
determining a next response node of the signal data according to the node attribute of the initiating node;
sending the signal data to the next responding node.
2. The method of claim 1, wherein prior to determining a next responding node for the signal data, the method further comprises:
assigning the attribute information of the signal data; wherein the attribute information includes one or a combination of: a first field for representing whether the signal data is finished, a second field for representing whether the signal data reaches the last responding node, and a third field for representing the jumping times of the signal data.
3. The method of claim 2, wherein determining a next responding node for the signal data according to the node attribute of the originating node comprises:
judging whether the initiating node can respond to the signal data or not according to the attribute information of the signal data;
and when the initiating node is judged to be capable of responding to the signal data, determining the next responding node of the signal data according to the node attribute of the initiating node.
4. The method of claim 3, wherein the attribute information comprises the first field;
the determining, according to the attribute information of the signal data, whether the originating node can respond to the signal data includes:
judging whether the signal data is finished or not according to the first field;
and when the signal data is judged not to be finished, determining that the initiating node can respond to the signal data.
5. The method of claim 3, wherein the attribute information comprises the second field;
the determining, according to the attribute information of the signal data, whether the originating node can respond to the signal data includes:
judging whether the signal data reaches the last response node or not according to the second field;
and when the signal data is judged not to reach the last responding node, determining that the initiating node can respond to the signal data.
6. The method of claim 1, wherein determining a next responding node for the signal data according to the node attribute of the originating node comprises:
judging whether the node attribute contains a preset next response node or not;
when the judgment result is yes, determining a preset next response node as the next response node of the signal data;
if the judgment result is negative, acquiring the node type from the node attribute; and determining a default response node corresponding to the node type as the next response node of the signal data according to a preset corresponding relationship between the node type and the default response node.
7. The method of claim 6, wherein the correspondence comprises:
the node type is a model layer, and the corresponding default response node is empty;
the node type is a view layer or a controller layer, and the corresponding default response node is a node on the upper layer of the node.
8. An apparatus for message delivery based on an MVC architecture, the apparatus comprising:
the generating module is used for generating signal data when receiving a triggering instruction of a user for the initiating node; the initiating node is any one of a model layer node, a view layer node and a controller layer node;
a determining module, configured to determine a next response node of the signal data according to the node attribute of the initiating node;
a sending module, configured to send the signal data to the next response node.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor, when executing the computer program, implements the method of any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method of any one of claims 1 to 7.
CN201811230451.9A 2018-10-22 2018-10-22 Message transmission method, device, equipment and storage medium based on MVC architecture Pending CN111078196A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811230451.9A CN111078196A (en) 2018-10-22 2018-10-22 Message transmission method, device, equipment and storage medium based on MVC architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811230451.9A CN111078196A (en) 2018-10-22 2018-10-22 Message transmission method, device, equipment and storage medium based on MVC architecture

Publications (1)

Publication Number Publication Date
CN111078196A true CN111078196A (en) 2020-04-28

Family

ID=70308329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811230451.9A Pending CN111078196A (en) 2018-10-22 2018-10-22 Message transmission method, device, equipment and storage medium based on MVC architecture

Country Status (1)

Country Link
CN (1) CN111078196A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706717A (en) * 2009-10-12 2010-05-12 南京联创科技集团股份有限公司 Method for processing acquisition index dynamic image
US20120054262A1 (en) * 2010-08-30 2012-03-01 Sap Ag Architecture for modeled pattern based user interfaces
US20130111506A1 (en) * 2011-11-02 2013-05-02 Oracle International Corporation Content delivery within an application
US20130246944A1 (en) * 2012-03-19 2013-09-19 Mohan Kumar Pandiyan Systems and methods for providing user interfaces for management applications
US20150205582A1 (en) * 2014-01-23 2015-07-23 Apple Inc. Application dataflow aware property and bindings
CN105302532A (en) * 2014-06-25 2016-02-03 成都普中软件有限公司 Visual modeling editor for constructing system model
CN105938442A (en) * 2016-04-12 2016-09-14 大医生(上海)医疗股份有限公司 Multi-role dynamic medical information transmission mechanism based on MVC architectural pattern
CN105955714A (en) * 2016-04-15 2016-09-21 北京海尔广科数字技术有限公司 Mixed development front end MVC frame implementation method and system
CN108647019A (en) * 2018-05-14 2018-10-12 浪潮通用软件有限公司 A kind of control layer coding method of Services Composition

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101706717A (en) * 2009-10-12 2010-05-12 南京联创科技集团股份有限公司 Method for processing acquisition index dynamic image
US20120054262A1 (en) * 2010-08-30 2012-03-01 Sap Ag Architecture for modeled pattern based user interfaces
US20130111506A1 (en) * 2011-11-02 2013-05-02 Oracle International Corporation Content delivery within an application
US20130246944A1 (en) * 2012-03-19 2013-09-19 Mohan Kumar Pandiyan Systems and methods for providing user interfaces for management applications
US20150205582A1 (en) * 2014-01-23 2015-07-23 Apple Inc. Application dataflow aware property and bindings
CN105302532A (en) * 2014-06-25 2016-02-03 成都普中软件有限公司 Visual modeling editor for constructing system model
CN105938442A (en) * 2016-04-12 2016-09-14 大医生(上海)医疗股份有限公司 Multi-role dynamic medical information transmission mechanism based on MVC architectural pattern
CN105955714A (en) * 2016-04-15 2016-09-21 北京海尔广科数字技术有限公司 Mixed development front end MVC frame implementation method and system
CN108647019A (en) * 2018-05-14 2018-10-12 浪潮通用软件有限公司 A kind of control layer coding method of Services Composition

Similar Documents

Publication Publication Date Title
CN113110941B (en) Managing delivery of code and dependency data using application containers
JP6892447B2 (en) Methods and systems for communication in instant messaging applications
US10861107B2 (en) Interaction system and method, client, and background server
CN104035683B (en) A kind of communicating terminal split screen multi-task interaction method
CN112565804A (en) Live broadcast interaction method, equipment, storage medium and system
CN107450903A (en) A kind of information processing method and device
EP4131054A1 (en) Document editing method and apparatus, computer device and storage medium
WO2022016981A1 (en) Image processing methods and apparatus, storage medium, and electronic device
CN110120908B (en) Group message processing method and device and server
CN114116092A (en) Cloud desktop system processing method, cloud desktop system control method and related equipment
CN108933947B (en) Bullet screen display method and device
CN110324722B (en) Method, device, equipment and storage medium for acquiring data in live broadcast room
CN114567792A (en) Virtual resource display method, device, equipment, server and storage medium
CN115017030A (en) Resource allocation method, device, electronic equipment and storage medium
CN112163174B (en) Message display method and device, storage medium and computer equipment
CN113343138A (en) Rollback interception method and device, intelligent terminal and storage medium
CN110597513B (en) WEB interface generation method and related device
CN111078196A (en) Message transmission method, device, equipment and storage medium based on MVC architecture
CN116301845A (en) Form generation method and device and electronic equipment
JP7552443B2 (en) Information processing method, program, and information processing device
CN113888295A (en) Travel reimbursement method, travel reimbursement device, storage medium and electronic equipment
CN112346615A (en) Information processing method and device
CN113225388A (en) Distributed scheduling method and device, equipment and storage medium
CN106934555B (en) Workflow organization method and device, computer equipment and storage medium
CN113949601B (en) Inter-controller station communication method, device and computer 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200428