Inter-component communication method, related device and computer program product
By receiving and forwarding the use information of components of cross -domain components, cross -domain component communication problems are solved, and high -efficiency communication and status linkage between components are realized, and user experience and operational efficiency are improved.
Patent Information
- Application Number
- CN202411417074.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to achieve efficient and quality communication between cross-domain components, resulting in the inability of external components to achieve effective communication with intra-domain components.
By receiving the component usage information sent by the non-co-domain component in the form of broadcast due to being called or changing state, and based on this information, the target current-domain component associated with the non-co-domain component is determined, and the component usage information is forwarded to the target current-domain component. To achieve cross-domain communication and linked changes in its own status.
It realizes cross-domain communication between components, improves the collaborative working ability and user experience between components, saves user operation steps, and improves operation efficiency.
Smart Images

Figure CN119337016A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for communication between components, an electronic device, a computer-readable medium, and a computer program product. Background Art
[0002] With the development of society, computer technology is also improving day by day. Browsers and various websites often set up multiple components to provide users with rich functions, and allow users to use these components and pages related to these components at the same time to meet different usage needs. For example, users can use multiple pages and windows to obtain multiple functions in the same website at the same time.
[0003] However, in general, components often only communicate with other components in their own domain, that is, the communication is provided by the same domain, and components in the domain often cannot communicate with components outside the domain due to lack of communication paths. Therefore, how to achieve efficient and high-quality communication between cross-domain components is worthy of attention and urgent need. Summary of the invention
[0004] Multiple aspects of the present application provide a method, apparatus, electronic device, computer-readable storage medium and computer program product for communication between components. When any domain component is called or its status changes, it not only transmits its component usage information to other components in the domain, but also broadcasts the component usage information outside the domain, so that components in non-same domains can obtain the component usage information by receiving the broadcast information, and forward the component usage information to the target current domain component with which there is an association relationship in the domain, thereby realizing cross-domain communication between components and the linkage change of their own status.
[0005] One aspect of the present application provides a method for communication between components, including: receiving component usage information sent in a broadcast form by a non-same-domain component due to being called or changing its state; wherein the non-same-domain component is a component in a domain other than the current domain; determining a target current domain component associated with the non-same-domain component based on the component usage information; and forwarding the component usage information to the target current domain component, so that the target current domain component changes its own state based on the component usage information.
[0006] On the other hand, the present application provides a device for inter-component communication, including: a broadcast information receiving unit, configured to receive component usage information sent in a broadcast form by a non-same-domain component due to being called or changing its state; wherein the non-same-domain component is a component in a domain other than the current domain; an associated component determination unit, configured to determine a target current domain component associated with the non-same-domain component based on the component usage information; and an information forwarding unit, configured to forward the component usage information to the target current domain component, so that the target current domain component changes its own state based on the component usage information.
[0007] Another aspect of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the inter-component communication method provided above.
[0008] In another aspect of the present application, a computer-readable storage medium is provided, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the inter-component communication method provided above.
[0009] In another aspect of the present application, a computer program product includes a computer program having computer program instructions stored thereon. When the computer program is executed by a processor, the inter-component communication method provided above can be implemented.
[0010] In the scheme provided by the embodiment of the present application, first, component usage information is received in the form of a broadcast sent by a non-same-domain component due to being called or changing its state, and the non-same-domain component is a component in another domain different from the current domain; then, the target current domain component associated with the non-same-domain component is determined based on the component usage information; finally, the component usage information is forwarded to the target current domain component, so that the target current domain component changes its own state according to the component usage information. That is, when any domain component is called or its state changes, it not only transmits its component usage information to other components in the domain, but also broadcasts the component usage information outside the domain, so that the non-same-domain component obtains the component usage information by receiving the broadcast information, and forwards the component usage information to the target current domain component with which it has an associated relationship in the domain, thereby realizing cross-domain communication between components and linkage changes of their own states. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0013] Figure 1 A schematic diagram of an inter-component communication process provided in an embodiment of the present application;
[0014] Figure 2 A schematic diagram of a process for determining an associated target current domain component based on a component number provided in an embodiment of the present application;
[0015] Figure 3 A schematic diagram of a process of determining an associated target current domain component based on a usage mode of a component provided in an embodiment of the present application;
[0016] Figure 4 A schematic diagram of a process of triggering a change prompt notification based on a component usage information change in its own state is provided for an embodiment of the present application;
[0017] Figure 5 A schematic diagram of another process of triggering a change prompt notification according to a component usage information changing its own state provided in an embodiment of the present application;
[0018] Figure 6 A schematic diagram of the structure of an apparatus for inter-component communication provided in an embodiment of the present application;
[0019] Figure 7 The present invention is a schematic diagram of the structure of an electronic device suitable for implementing the solution in the embodiment of the present application.
[0020] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0023] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0024] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, modules of programs or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0025] As discussed above, how to achieve efficient and quality communication between cross-domain components is worthy of attention and urgent need. Or more specifically, how to achieve cross-domain communication between components so that different domain components in the world can respond to the component usage information of non-same domain components associated with themselves and make coordinated changes is worthy of attention and urgent for technicians in this field to solve.
[0026] In this regard, an embodiment of the present application provides a method for communication between components, which first receives component usage information sent in a broadcast form by a non-same-domain component due to being called or changing its status, and the non-same-domain component is a component in another domain different from the current domain; then determines the target current domain component associated with the non-same-domain component based on the component usage information; finally, forwards the component usage information to the target current domain component, so that the target current domain component changes its own status based on the component usage information.
[0027] From the technical content provided by the above scheme, it can be known that this scheme controls any domain component to not only pass its component usage information to other components in the domain when it is called or its state changes, but also broadcast the component usage information outside the domain, so that non-domain components can obtain the component usage information by receiving broadcast information, and forward the component usage information to the target current domain component with an associated relationship in the domain, thereby realizing cross-domain communication between components and the linkage change of their own states.
[0028] In actual scenarios, the execution subject of the method can be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0029] When the execution subject is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules, or as a single software or software module, and no specific limitation is made here.
[0030] Figure 1 An inter-component communication process 100 provided in an embodiment of the present application is shown. The process 100 includes at least the following processing steps:
[0031] (Step) S101, receiving component usage information broadcasted by a non-same-domain component due to being called or having its status changed.
[0032] In an embodiment of the present application, an execution entity (for example, one of the multiple web page tabs presented by a browser application installed on a user device or server, that is, it serves as the current domain, and the remaining web page tabs serve as non-domains different from the current domain) receives component usage information sent in a broadcast form by a non-domain component due to being called or changing its state.
[0033] Specifically, taking web page tab A among multiple web page tabs presented by a browser application as an example (then the remaining web page tabs B and C corresponding to other websites are in different domains from web page tab A), each component on web page tab A receives component usage information from web page tab B and / or C due to being called or having its status changed, and broadcasts it within the data transmission range provided by the browser application, thereby enabling the originally cross-domain A, B, and C to achieve coverage of broadcast information with the help of the same browser application.
[0034] The above example is given with the browser application as an example. In this scenario, the components in the current domain may include: components displayed in the top window of the browser. Correspondingly, the components in non-same domain may include: components in other created windows that are not displayed in the non-top window of the browser. That is, if the content currently displayed in the window is tab A, then tabs B and C are both in the background.
[0035] Furthermore, this solution can also jump out of the application scenario of the browser, that is, the components in the current domain may include: components supported by the first database, and correspondingly, the non-same-domain components may include: components supported by the second database, and the second database is a database different from the first database. That is, the cross-domain of components only needs to ensure that the two are supported by different databases, regardless of whether it is specific to the browser scenario.
[0036] S102: Determine, according to the component usage information, a target current domain component that is associated with a non-same domain component.
[0037] Based on S101, this step aims to determine the target current domain component associated with the non-same domain component based on the component usage information, that is, the current domain determines which components in the domain are the target current domain components associated with the component usage information.
[0038] Specifically, there are many situations that may lead to association, such as association between functions of components, association between services provided by components, association between operating states of components, linkage effects between components, etc.
[0039] S103, forwarding the component usage information to the target current domain component, so that the target current domain component changes its own state according to the component usage information.
[0040] Based on S102, this step aims to forward the component usage information to the target current domain component by the above-mentioned execution entity, so that the target current domain component adjusts its own state according to the received component usage information, thereby realizing cross-domain communication between components and state linkage based on communication results.
[0041] It should be understood that with the support of the above-mentioned solution provided in this embodiment, when responding to user operations, multiple domain components that were originally running independently can not only realize the response of the specific operated component to provide feedback to the user, but other domain components that are not directly operated by the user can also provide feedback through the cross-domain communication method, thereby saving the user the steps of operating different domain components separately, improving operating efficiency, and also improving the user experience.
[0042] Please refer to Figure 2 , Figure 2 A schematic diagram of a process for determining an associated target current domain component based on a component number provided in an embodiment of the present application, that is, for Figure 1Step 102 in the process 100 shown provides a specific implementation method, and other steps in the process 100 are not adjusted. The specific implementation method provided by this embodiment can be used to replace step 102 to obtain a new complete embodiment. Figure 2 The process 200 shown includes the following steps:
[0043] S201, determining the component number of the non-same-domain component according to the component usage information.
[0044] S202: According to the association relationship between different component numbers recorded in the preset corresponding table, determine the target current domain component associated with the component number in each current domain component in the current domain.
[0045] This embodiment provides a technical means for identifying and determining the association between components in different domains in a software system. To achieve the desired technical effect, the above solution can also be broken down into the following technical points:
[0046] 1) Collection and analysis of component usage information
[0047] First, the system needs to collect and record the usage information between components, that is, which components are called or referenced in other components. This can be obtained through static code analysis, runtime monitoring, logging, etc. This usage information will help the system understand the dependencies and interactions between components.
[0048] 2) Identification of non-codomain components
[0049] By using the information, components that may be cross-domain are determined, that is, those components that do not belong to the current domain. This can be identified based on the component's identifier or other attributes. The system needs to establish a list of cross-domain components for subsequent processing.
[0050] 3) Establishment of preset correspondence table
[0051] The associations between different component numbers are recorded in the preset correspondence table, that is, which components have specific associations or dependencies. This correspondence table can be created manually or generated by automated tools. In this way, the system can match and associate components based on these relationships.
[0052] 4) Determination of component association
[0053] According to the records in the preset corresponding table, the target component associated with the non-same-domain component number is determined in each component in the current domain. This can be achieved by searching for matching associations in the preset corresponding table and determining the target component.
[0054] 5) Identification and interaction of target components
[0055] Ultimately, the system can achieve interaction and communication between components by identifying and determining target components associated with non-same-domain components. This helps the system share data, functions or resources between different domains and improves the overall flexibility and scalability of the system.
[0056] That is, this embodiment records the association relationship between different component numbers by pre-building a preset correspondence, so that the system can more effectively manage and transfer components from other domain components to associated components based on the association relationship, thereby realizing component interaction and collaboration between different domains of the system.
[0057] Please refer to Figure 3 , Figure 3 A schematic diagram of a process for determining an associated target current domain component based on the usage mode of a component provided in an embodiment of the present application, that is, for Figure 1 Step 102 in the process 100 shown provides a specific implementation method, and other steps in the process 100 are not adjusted. The specific implementation method provided by this embodiment can be used to replace step 102 to obtain a new complete embodiment. Figure 3 The process 300 shown includes the following steps:
[0058] S301, determining the usage mode of non-same-domain components according to component usage information.
[0059] S302: Determine the current domain component affected by the usage mode in the current domain as the target current domain component.
[0060] contrast Figure 2 It can be seen from the provided implementation that this embodiment determines the current domain component affected by the usage mode in the current domain as the target current domain component based on the usage mode of the component. The key point of this implementation process is to determine the relevance and whether it is affected based on the usage mode, which may specifically include the following contents:
[0061] 1) Determine how to use non-co-domain components
[0062] Identify non-same-domain components: Identify which components belong to non-same-domain components based on their identifiers, domain tags, and other information. These components are usually outside the current domain, but have a direct or indirect impact on components in the current domain.
[0063] Analyze usage: Determine how non-same-domain components are used by analyzing their usage information. This includes: call frequency: how often non-same-domain components are called; call mode: the mode of component calls, such as single call or loop call, or synchronous call or asynchronous call; data interaction: the type and amount of data exchanged by components during the call process.
[0064] Build usage model: Based on the analysis results, build a usage model for non-same-domain components. This can include a description of the usage, influencing factors, and its potential impact on other components.
[0065] 2) Impact assessment and target component determination
[0066] Impact assessment: Evaluate the impact of the use of non-same-domain components on components in the current domain. This usually includes: direct impact: how non-same-domain components directly call or affect components in the current domain; indirect impact: whether the behavior of non-same-domain components affects components in the current domain through intermediaries or dependency chains.
[0067] Determine the affected current domain components: Based on the results of the impact assessment, identify the components in the current domain that are affected by the use of non-same-domain components. These components may include: Directly dependent components: Current domain components that directly call or depend on non-same-domain components; Indirectly affected components: Current domain components that are indirectly affected by non-same-domain components through intermediaries or other components.
[0068] Target component selection: Identify the affected current domain components as target components. This step may require selecting the most critical or most in need of adjustment components as targets based on specific requirements or system design specifications.
[0069] 3) Application and verification
[0070] Apply the impact analysis results: After determining the target component, you need to apply the analysis results to adjust the component design or configuration in the current domain. For example, you may need to optimize the performance of the target component, adjust its interface with non-domain components, or modify its data processing logic.
[0071] Verification and testing: Verify and test the adjusted target component to ensure that its interaction with non-same-domain components is as expected and does not introduce new problems. Verification can be performed through unit testing, integration testing, or system testing.
[0072] Feedback and Adjustment: Based on the test results and actual operation conditions, further adjust and optimize components to improve the overall performance and stability of the system.
[0073] It should be understood that Figure 2 and Figure 3 The respective implementation methods provided can be selected and adaptively adjusted according to any existing constraints or preferences in the actual application scenario, and are not specifically limited here.
[0074] The above mainly describes how to change the status of associated components in the current domain according to the component usage information received from components in other domains from the perspective of the current domain through multiple embodiments. To facilitate understanding of subsequent steps, this embodiment also describes two different triggering prompt notification schemes through the following two embodiments:
[0075] Please refer to Figure 4 , Figure 4 A schematic diagram of a process of triggering a change prompt notification according to a change in the state of a component using information is provided for an embodiment of the present application, wherein the process 400 includes the following steps:
[0076] S401, in response to the target current domain component changing its own state according to the component usage information, new component usage information is sent in a broadcast form.
[0077] S402, in response to a component in another domain changing its own state according to the new component usage information, triggering a component state change prompt notification.
[0078] That is, after the target current domain component completes its own state change due to receiving component usage information sent by a non-same domain component, it also needs to broadcast the component usage information because its own state has changed, so as to broadcast the state change between the target current component and itself. Then, after discovering that components in other domains have changed their own states according to the new component usage information, considering that other domains may not be presented to users at the top level like the current domain, a component state change prompt notification can be triggered to let users know that it has changed.
[0079] To achieve the above goals, the solution can actually be broken down into the following technical means:
[0080] Component state management: It is an important mechanism to ensure that all parts of the system work in coordination. The component state usually includes its activity status, resource usage, configuration settings, etc. In order to achieve this function, the system needs to maintain the state information of the component and provide a mechanism to update and propagate these state changes.
[0081] State broadcast: involves passing state change information from one component to other related components in the system. Common technical means include message queues, event buses, etc. Message queues such as Apache Kafka and RabbitMQ can publish information to specific queues or topics when the state changes, and other components can subscribe to these queues to receive state change information. Event buses (such as Google Cloud Pub / Sub) allow a publish-subscribe model and support flexible event broadcasting.
[0082] Event notification: When a component's state changes, the system needs to inform other components through some form of notification mechanism. This can be achieved by publishing events or calling notification services. For example, WebSocket can be used for real-time notifications, or HTTP notification services can be used to send status update information.
[0083] Cross-domain communication: In a distributed system, cross-domain communication refers to the transmission of information between different domains or microservices. Common technical means to achieve this communication include RESTful API, gRPC, GraphQL, etc. These technologies allow different components or services to exchange and call data efficiently in the network.
[0084] Data consistency: In order to ensure the state consistency of all components in the system, it is necessary to implement consistency protocols, such as CAP theorem, two-phase commit (2PC) or three-phase commit (3PC). These protocols help ensure that the data between different components remains consistent during the state change process.
[0085] The technical effects that can be achieved after adopting the above specific technical means include:
[0086] Real-time: Through state broadcasting and event notification, the system can propagate state change information in real time. This real-time feature enables each component to respond to changes quickly and keep the system synchronized and coordinated. For example, if a user's state changes in a system component, other components that need to know this state can be notified immediately and quickly make corresponding processing.
[0087] Decoupling: State broadcasting and event-driven mechanisms help achieve loose coupling between components. Components do not need to directly rely on the implementation of other components, but interact through state information. This decoupling improves the flexibility and maintainability of the system, making it easier to add or modify components in the system.
[0088] Scalability: Mechanisms such as message queues and event buses can support horizontal expansion of the system. When the system needs to handle more components or higher loads, the message system can handle a large amount of state change information to ensure that the system can still operate effectively when expanding.
[0089] Fault tolerance: The broadcast and notification mechanisms used in distributed systems are usually fault-tolerant. Even if some components fail, other components are still able to receive state change notifications and continue to work normally. This fault-tolerance mechanism improves the reliability and robustness of the system.
[0090] Consistency: By implementing a consistency protocol, the system is able to maintain data and state consistency in a distributed environment. This ensures that data remains synchronized even when state updates are made between multiple components and services, avoiding data inconsistency issues.
[0091] Monitorability: Component status changes and their notification mechanisms provide visualization and monitoring capabilities for system operation. By recording and monitoring status change events, system administrators can track the health and performance of the system in real time, and perform troubleshooting and optimization.
[0092] Figure 5 This is another schematic diagram of a process of triggering a change prompt notification according to a change in the state of a component using information provided by an embodiment of the present application, wherein the process 500 includes the following steps:
[0093] S501, in response to the target current domain component changing its own state according to the component usage information, determining the degree of difference between the change of its own state before and after the change.
[0094] S502: In response to the change difference being greater than a preset degree, triggering a component status change prompt notification.
[0095] Different from Figure 4 The solution provided is for the secondary transmission scenario of component state change. Figure 5 This is about whether the target current domain component also needs to initiate a status change prompt notification after its own status changes. This embodiment provides a solution that triggers a component status change prompt notification only when it is determined that the difference between the status before and after the change is large, so as to avoid frequent reminders caused by minor status changes.
[0096] The embodiment of the present application also provides a device for inter-component communication, the structure of which is as follows: Figure 6 The device 600 shown. The device 600 includes: a broadcast information receiving unit 610, configured to receive component usage information sent by a non-same domain component in a broadcast form due to being called or changing the state; wherein the non-same domain component is a component in another domain different from the current domain; an associated component determining unit 620, configured to determine the target current domain component associated with the non-same domain component according to the component usage information; an information forwarding unit 630, configured to forward the component usage information to the target current domain component, so that the target current domain component changes its own state according to the component usage information.
[0097] In some embodiments, components in the current domain include: components displayed in the top window of the browser, and correspondingly, components in non-same-domains include: components in other created windows that are not displayed in the non-top window of the browser.
[0098] In some embodiments, components in the current domain include: components supported by a first database, and correspondingly, components in non-same domain include: components supported by a second database, where the second database is a database different from the first database.
[0099] In some embodiments, the associated component determination unit is further configured to: determine the component number of the non-same-domain component based on the component usage information; and determine the target current domain component associated with the component number among each current domain component in the current domain based on the association relationship between different component numbers recorded in the preset correspondence table.
[0100] In some embodiments, the associated component determination unit is further configured to: determine the usage mode of the non-same-domain components according to the component usage information; and determine the current domain component affected by the usage mode in the current domain as the target current domain component.
[0101] In some embodiments, the device 600 also includes: a new component usage information broadcasting unit, which is configured to send new component usage information in a broadcast form in response to the target current domain component changing its own state according to the component usage information, so that components in other domains other than the current domain change their own states according to the received new component usage information.
[0102] In some embodiments, the apparatus 600 further includes: a first state change prompt notification trigger unit configured to trigger a component state change prompt notification in response to a component in another domain changing its own state according to new component usage information.
[0103] In some embodiments, the device 600 also includes: a difference degree determination unit, configured to determine the difference degree of change before and after the change of its own state in response to the target current domain component changing its own state according to the component usage information; a state change prompt notification second trigger unit, configured to trigger a component state change prompt notification in response to the change difference degree being greater than a preset degree.
[0104] The embodiment of the present device corresponds to the embodiment of the method as shown in the above figures. First, the component usage information is received in the form of a broadcast sent by a non-same-domain component due to being called or changing its state. The non-same-domain component is a component in another domain different from the current domain; then, the target current domain component associated with the non-same-domain component is determined based on the component usage information; finally, the component usage information is forwarded to the target current domain component, so that the target current domain component changes its own state according to the component usage information. That is, by controlling any domain component to not only pass its component usage information to other components in the domain when it is called or its state changes, but also broadcast the component usage information outside the domain, so that the non-same-domain component obtains the component usage information by receiving the broadcast information, and forwards the component usage information to the target current domain component with which it is associated in the domain, thereby realizing cross-domain communication between components and linkage changes of their own states.
[0105] Based on the same inventive concept, an electronic device, a readable storage medium and a computer program product are also provided in an embodiment of the present application. The method corresponding to the electronic device may be the inter-component communication method in the aforementioned embodiment, and its principle of solving the problem is similar to that of the method. The electronic device provided in an embodiment of the present application includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by at least one processor, and the instructions are executed by at least one processor so that at least one processor can execute the methods and / or technical solutions of the aforementioned multiple embodiments of the present application.
[0106] The electronic device may be a user device, or a device formed by integrating a user device and a network device through a network, or an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, tablet computers, smart watches, and bracelets. The network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets, which can be used to implement some processing functions when setting an alarm. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing, where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0107] Figure 7The structure of an electronic device suitable for implementing the method and / or technical solution in the embodiment of the present application is shown, and the electronic device 700 includes a central processing unit (CPU, Central Processing Unit) 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM, Read Only Memory) 702 or the program loaded from the storage part 708 to the random access memory (RAM, Random Access Memory) 703. In RAM 703, various programs and data required for system operation are also stored. CPU 701, ROM 702 and RAM 703 are connected to each other through bus 705. Input / output (I / O, Input / Output) interface 704 is also connected to bus 705.
[0108] The following components are connected to the I / O interface 704: an input section 706 including a keyboard, a mouse, a touch screen, a microphone, an infrared sensor, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), an LED display, an OLED display, etc., and a speaker, etc.; a storage section 708 including one or more computer-readable media such as a hard disk, an optical disk, a magnetic disk, a semiconductor memory, etc.; and a communication section 709 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet.
[0109] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the central processing unit (CPU) 701, the above functions defined in the method of the present application are executed.
[0110] Another embodiment of the present application further provides a computer-readable storage medium and a computer program product, on which computer program instructions are stored. The computer program instructions can be executed by a processor to implement the methods and / or technical solutions of any one or more embodiments of the present application.
[0111] Specifically, the present embodiment can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, systems, devices or devices including but not limited to electricity, magnetism, light, electromagnetic, infrared, or semiconductors, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0112] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than a computer readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0113] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0114] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0117] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of modules and units is only a logical function division. There may be other division methods in actual implementation. For example, with units as an example, multiple units or page components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0118] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0119] In addition, each functional module or unit in each embodiment of the present application may be integrated into one processing module or unit, or each module or unit may exist physically separately, or two or more units may be integrated into one module or unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules or units.
[0120] The above-mentioned integrated modules and units implemented in the form of software function modules and units can be stored in a computer-readable storage medium. The above-mentioned software function modules and units are stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform some steps of the methods of each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program codes.
[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
[0122] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in a device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A method for communication between components, characterized in that: include: Receiving component usage information sent in a broadcast form by a non-same-domain component due to being called or changing its state; wherein the non-same-domain component is a component in another domain different from the current domain; Determine, according to the component usage information, a target current domain component associated with the non-same-domain component; The component usage information is forwarded to the target current domain component, so that the target current domain component changes its own state according to the component usage information.
2. The method according to claim 1, characterized in that The components in the current domain include: components displayed in the top window of the browser, and correspondingly, the non-same-domain components include: components that are not displayed in other created windows other than the top window of the browser.
3. The method according to claim 1, characterized in that The components in the current domain include: components supported by data from a first database. Correspondingly, the components in non-same domain include: components supported by data from a second database, where the second database is a database different from the first database.
4. The method according to claim 1, characterized in that: The determining, according to the component usage information, a target current domain component associated with the non-same domain component includes: Determine the component number of the non-same-domain component according to the component usage information; According to the association relationship between different component numbers recorded in the preset corresponding table, a target current domain component associated with the component number is determined from among the current domain components in the current domain.
5. The method according to claim 1, characterized in that The determining, according to the component usage information, a target current domain component associated with the non-same domain component includes: Determining a usage mode of the non-same-domain component according to the component usage information; A current domain component in the current domain that is affected by the usage mode is determined as the target current domain component.
6. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the target current domain component changing its own state according to the component usage information, new component usage information is sent out in a broadcast form, so that components in other domains other than the current domain change their own states according to the received new component usage information.
7. The method according to claim 6, characterized in that Also includes: In response to the component in the other domain changing its own state according to the new component usage information, a component state change prompt notification is triggered.
8. The method according to any one of claims 1 to 5, characterized in that: Also includes: In response to the target current domain component changing its own state according to the component usage information, determining a degree of difference between the change before and after the change of the own state; In response to the change difference being greater than a preset degree, a component state change prompt notification is triggered.
9. An inter-component communication device, characterized in that: include: The broadcast information receiving unit is configured to receive component usage information sent in a broadcast form by a non-same-domain component due to being called or having a state changed; wherein the non-same-domain component is a component in another domain different from the current domain; an associated component determining unit, configured to determine a target current domain component associated with the non-same-domain component according to the component usage information; The information forwarding unit is configured to forward the component usage information to the target current domain component, so that the target current domain component changes its own state according to the component usage information.
10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
11. A computer readable medium, characterized in that Computer program instructions are stored thereon, and the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Just in time trust establishment and propagation
CN102625985A
Linkage method and device for state information change
CN108052640A
Method and device for transferring events between components
CN110865889A
Method and device for determining linkage communication strategy, equipment and medium
CN114430420A
Cited By
Data cascade synchronization method and device for multi-level converged communication platform
CN121691425A