Communication method and device for components in application program, equipment and storage medium

A technology of application program and communication method, which is applied in the direction of multi-program device, inter-program communication, program control design, etc., and can solve the problems of not being able to know the whereabouts of messages, difficult to debug and maintain codes, and not knowing the source of messages, etc.

Active Publication Date: 2020-07-17
NANJING LINGXING TECH CO LTD
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For Android developers, there are many commonly used messaging methods, from the earliest used Handler, BroadcastReceiver, interface callback, Binder (both are the internal communication mechanism of the Android system), to the popular communication frameworks EventBus and RxBus in recent years etc. During the use of this kind of communication framework, once the event is abused, it will be difficult to debug and maintain the code due

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Communication method and device for components in application program, equipment and storage medium
  • Communication method and device for components in application program, equipment and storage medium
  • Communication method and device for components in application program, equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0029] figure 1 It is a flow chart of a communication method for components in an application program provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where components in an application program communicate with each other, and the method can be executed by a communication device for components in an application program , applied to the message bus in the communication framework on which the application program depends, specifically including the following steps:

[0030] S110. Parse the received message request packet.

[0031] In this embodiment, the message request message may specifically be understood as communication information sent by a functional component in an application program to a message bus for mutual communication with other functional components. The message request message carries at least the identification of the component communication, through the identification to determine the functional component as th...

Embodiment 2

[0055] Figure 4 It is a flow chart of a communication method for components in an application program provided by Embodiment 2 of the present invention. The technical solution of this embodiment is further refined on the basis of the above-mentioned technical solution, and specifically mainly includes the following steps:

[0056] S410. Parse the received message request packet.

[0057] Specifically, the message request message sent by the functional component serving as the message publisher is analyzed to obtain the identification information of the message receiver.

[0058] S420. If the message request message contains a second key identifier for intra-component communication, obtain the target component sub-service associated with the second key identifier from the predetermined second message monitoring table, so that all The target component sub-service responds to the request operation corresponding to the message request message.

[0059] In this embodiment, the ...

Embodiment 3

[0087] Figure 7 A structural diagram of a communication device for components in an application program provided by Embodiment 3 of the present invention, the device includes: a message parsing module 71 and a component acquisition module 72 .

[0088] In this embodiment, the message parsing module 71 is configured to parse the received message request message; the component obtaining module 72 is configured to, if the message request message contains the first key identifier used for inter-component communication, Obtain the target functional component associated with the first key identifier from the predetermined first message monitoring table, so that the target functional component responds to the request operation corresponding to the message request message; wherein, the first message The listening table is formed based on the business logic interface classes that the functional components in the application program depend on at the business service layer.

[0089] An...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a communication method, device and equipment for components in an application program and a storage medium, and the method is applied to a message bus in a communication framework on which the application program depends, and comprises the following steps: analyzing a received message request message; if the message request message contains a first key identifier for inter-component communication, obtaining a target function component associated with the first key identifier from a predetermined first message monitoring table, so that the target function component responds to a request operation corresponding to the message request message, wherein the first message monitoring table is formed on the basis of a business logic interface class on which a functional component in the application depends on a business service layer. The problem that the source and the destination of the message cannot be clearly known when components in the application communicate with each other is solved, the effect of clearly knowing event circulation in the whole message transmission process is achieved, the code is simple, and efficient decoupling is achieved.

Description

technical field [0001] Embodiments of the present invention relate to message communication technology, and in particular to a communication method, device, device and storage medium for components in an application program. Background technique [0002] In the long-term actual development process, with the continuous increase of application software APP functions, the business logic has become more and more complex, and there are intricate relationships among various modules, which are highly coupled together. Modifying a function affects the whole body. This is very detrimental to the maintenance and development of the project. In order to solve these problems, many componentization schemes have emerged in recent years. Different componentization schemes have different advantages and disadvantages, but the goal of componentization is basically the same, but the implementation ideas may be different. [0003] The communication method is the core of component development. ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/54
CPCG06F9/546G06F9/542
Inventor 赵冬冬彭杰
Owner NANJING LINGXING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products