CN112929870A - Event subscription method and electronic equipment - Google Patents

Event subscription method and electronic equipment Download PDF

Info

Publication number
CN112929870A
CN112929870A CN201911243475.2A CN201911243475A CN112929870A CN 112929870 A CN112929870 A CN 112929870A CN 201911243475 A CN201911243475 A CN 201911243475A CN 112929870 A CN112929870 A CN 112929870A
Authority
CN
China
Prior art keywords
event
event source
information
subscription
physical channel
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.)
Granted
Application number
CN201911243475.2A
Other languages
Chinese (zh)
Other versions
CN112929870B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911243475.2A priority Critical patent/CN112929870B/en
Priority to PCT/CN2020/133787 priority patent/WO2021110117A1/en
Publication of CN112929870A publication Critical patent/CN112929870A/en
Application granted granted Critical
Publication of CN112929870B publication Critical patent/CN112929870B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W8/00Network data management
    • H04W8/18Processing of user or subscriber data, e.g. subscribed services, user preferences or user profiles; Transfer of user or subscriber data
    • H04W8/20Transfer of user or subscriber data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Telephone Function (AREA)

Abstract

The invention provides an event subscription method and electronic equipment, wherein the method comprises the following steps: inquiring IPC information of an event source in the event source information set; establishing a logic channel based on IPC information and an event source; under the condition that the connection mode of the logic channel is a non-direct connection mode, the logic channel is arranged on a first physical channel, and the first physical channel is a physical channel used by other subscribers except the current subscriber in the subscriber process for subscribing the events of the event source; sending subscription information to an event source through a logical channel established above a first physical channel; and receiving the event fed back by the event source for the subscription information through a logical channel established above the first physical channel. By the technical scheme of the invention, multiple subscribers in the same process realize the multiplexing of the physical channels, the number of the physical channels required to be established is greatly reduced, and the effective utilization rate and the working efficiency of system resources are integrally improved.

Description

Event subscription method and electronic equipment
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of terminal technologies, and in particular, to an event subscription method and an electronic device.
[ background of the invention ]
In a computer system, an event mechanism is used for distributing events generated by an event producer to interested consumers for processing, so that the aim of decoupling the producer and the consumers is fulfilled, new addition and deletion of the consumers do not affect the producer, and addition and deletion of the producer (which can be a plurality of producers) do not affect the consumers. Event producers are also referred to as event sources or publishers and consumers are also referred to as subscribers. With the development of intelligent terminals, more and more mobile intelligent devices and smart home devices are provided in the hands of users, various application programs are also endless, and subscribers in the application programs need to pay attention to a large number of events. The logical channel for transmitting events between an event source and a subscriber depends on the physical channel of the entity.
However, there are a lot of events in the electronic device, such as location information change, device power state change, time change, network state change, etc., and similarly, subscribers who subscribe to a lot of events are distributed in each application, and in order to implement smooth operation of an event mechanism, a physical channel is established between each subscriber and an event source subscribed to an event, which results in a lot of physical channels being required to be established. The establishment of a large number of physical channels causes a large amount of system overhead, occupies too many system resources, and then occupies resources of other objects in the system, thereby affecting the overall working efficiency of the system.
Therefore, how to reduce the system resources occupied by the physical channels of the event mechanism becomes a technical problem to be solved at present.
[ summary of the invention ]
The embodiment of the invention provides an event subscription method and electronic equipment, and aims to solve the technical problem that a large number of physical channels of an event mechanism consume too much system resources in the related art.
In a first aspect, an embodiment of the present invention provides an event subscription method, including: inquiring IPC information of an event source in the event source information set; establishing a logic channel with the event source based on the IPC information; under the condition that the connection mode of the logic channel is a non-direct connection mode, the logic channel is arranged on a first physical channel, and the first physical channel is a physical channel used by other subscribers except the current subscriber in the subscriber process for subscribing the event of the event source; sending subscription information to the event source through the logical channel established on the first physical channel; receiving the event fed back by the event source for the subscription information through the logical channel established on the first physical channel.
Wherein, a subscriber in the electronic equipment inquires IPC information of an event source in an event source manager with an event source information set.
And a subscriber in the electronic equipment establishes a logic channel with the event source through a channel manager based on the IPC information.
And under the condition that the connection mode of the logical channel is a non-direct connection mode, the channel manager sets the logical channel on a first physical channel, wherein the first physical channel is a physical channel used by other subscribers in the subscriber process to which the subscriber belongs to subscribe the event of the event source.
And a subscriber in the electronic equipment sends subscription information to the event source through the logic channel established on the first physical channel.
And a subscriber in the electronic equipment receives the event fed back by the event source for the subscription information through the logic channel established on the first physical channel.
In a possible design, in a case that a connection mode of the logical channel is a direct connection mode, a second physical channel is newly created; and arranging the logic channel above the second physical channel.
And the subscriber in the electronic equipment creates a second physical channel when the connection mode of the logical channel is the direct connection mode.
A subscriber in the electronic device places the logical channel on top of the second physical channel.
In one possible design, before the step of querying IPC information of an event source in an event source information set, the method further includes: when any event source is initialized, storing event source information of the event source into the event source information set, wherein the event source information comprises an event source ID, a support event list and the IPC information.
When any event source in the electronic equipment is initialized, the event source information of the electronic equipment is stored into an event source manager of the electronic equipment, and the event source manager is provided with an event source information set, wherein the event source information comprises an event source ID, a support event list and the IPC information.
In one possible design, the event sources include local device event sources and/or cross-device event sources.
Subscribers in an electronic device may subscribe to the device event source and/or cross-device event sources.
When the device event source and the cross-device event source are initialized, the event source information of the device and the cross-device event source are stored into the event source information set of the electronic device where the device is located, and event source managers of different electronic devices synchronize the event source information.
In one possible design, the step of querying the IPC information of the event source in the event source information set includes: inquiring a first event source to which an event to be subscribed belongs in the event source information set; judging whether the current subscription authority meets a first preset condition or not; and inquiring IPC information of the first event source in the event source information set based on the condition that the current subscription authority meets the first preset condition.
The event source manager of the electronic device queries a first event source to which an event to be subscribed belongs in an event source information set of the event source manager.
An event source manager of the electronic equipment judges whether the current subscription authority of the subscriber meets a first preset condition.
Based on the condition that the current subscription authority meets the first preset condition, an event source manager of the electronic equipment inquires IPC information of the first event source in the event source information set and sends the IPC information to a subscriber so that the subscriber establishes a logic channel with the first event source according to the IPC information to subscribe and receive events.
In one possible design, the first predetermined condition is: the current subscription authority is greater than or equal to the subscribeable authority of the event to be subscribed, and/or the current subscription authority is greater than or equal to the subscribeable authority of the first event source.
In one possible design, the step of querying the IPC information of the event source in the event source information set includes: querying a second event source which accords with a preset screening rule in the event source information set; judging whether the current subscription authority meets a second preset condition or not; and inquiring IPC information of the second event source in the event source information set based on the condition that the current subscription authority meets the second predetermined condition.
The event source manager of the electronic equipment queries a second event source which accords with a preset screening rule in the event source information set of the event source manager.
And the event source manager of the electronic equipment judges whether the current subscription authority of the subscriber meets a second preset condition.
Based on the condition that the current subscription authority meets the second preset condition, an event source manager of the electronic equipment inquires IPC information of the second event source in the event source information set and sends the IPC information to the subscriber so that the subscriber establishes a logic channel with the second event source according to the IPC information to subscribe and receive events.
In one possible design, the second predetermined condition is: the current subscription right is greater than or equal to the subscribeable right of the event to be subscribed in the second event source, and/or the current subscription right is greater than or equal to the subscribeable right of the second event source.
In a second aspect, an embodiment of the present invention provides an event subscription apparatus, including: the IPC information query module is used for querying the IPC information of the event source in the event source information set; a logic channel establishing module for establishing a logic channel with the event source based on the IPC information; a physical channel setting module, configured to set the logical channel on a first physical channel when a connection mode of the logical channel is a non-direct connection mode, where the first physical channel is a physical channel used by other subscribers except a current subscriber in a process of the current subscriber to subscribe to an event of the event source; the event subscription module is used for sending subscription information to the event source through the logic channel established on the first physical channel; and the event receiving module is used for receiving the event fed back by the event source aiming at the subscription information through the logic channel established on the first physical channel.
In one possible design, further comprising: a physical channel creation module, configured to create a second physical channel when the connection mode of the logical channel is a direct connection mode; the physical channel setting module is further configured to: and arranging the logic channel above the second physical channel.
In one possible design, further comprising: and the event source information storage module is used for storing the event source information of any event source to the event source information set when any event source is initialized before the IPC information of the event source is inquired by the IPC information inquiry module, wherein the event source information comprises an event source ID, a support event list and the IPC information.
In one possible design, the IPC information query module includes: the first event source query module is used for querying a first event source to which an event to be subscribed belongs in the event source information set; the first judgment module is used for judging whether the current subscription authority meets a first preset condition or not; and the first execution module is used for inquiring the IPC information of the first event source in the event source information set based on the condition that the current subscription authority meets the first preset condition.
In one possible design, the first predetermined condition is: the current subscription authority is greater than or equal to the subscribeable authority of the event to be subscribed, and/or the current subscription authority is greater than or equal to the subscribeable authority of the first event source.
In one possible design, the IPC information query module includes: the second event source query module is used for querying a second event source which accords with a preset screening rule in the event source information set; the second judgment module is used for judging whether the current subscription authority meets a second preset condition or not; and the second execution module is used for inquiring the IPC information of the second event source in the event source information set based on the condition that the current subscription authority meets the second preset condition.
In one possible design, the second predetermined condition is: the current subscription right is greater than or equal to the subscribeable right of the event to be subscribed in the second event source, and/or the current subscription right is greater than or equal to the subscribeable right of the second event source.
In one possible design, the event sources include local device event sources and/or cross-device event sources.
In a third aspect, an embodiment of the present invention provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the first aspects above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions for performing the method flow described in any one of the first aspect.
In a fifth aspect, an embodiment of the present invention provides a computer program product, which, when run on an electronic device, causes the electronic device to execute the method flow described in any one of the above first aspects.
Through the technical scheme, the multiplexing of the physical channels is realized for a plurality of subscribers in the same process, and the number of the physical channels required to be established is greatly reduced, so that the consumption of system resources is reduced, the system is convenient to provide effective resources for other processes, and the effective utilization rate and the working efficiency of the system resources are integrally improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic structural diagram of an electronic device to which the present application relates.
Fig. 2 is a flowchart illustrating an event subscription method according to an embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a principle of multiplexing a physical channel subscription event according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a principle of multiplexing a physical channel subscription event across devices according to an embodiment of the present invention;
fig. 5 shows a schematic block diagram of an event subscription apparatus according to an embodiment of the present invention.
[ detailed description ] embodiments
For ease of understanding, some descriptions of concepts related to the embodiments of the present application are given by way of example for reference. As follows:
event: refers to content executed by the electronic device. For example, a user operation such as a mouse click, a mouse drag, a keyboard input, etc. performed on the interface of the electronic device.
Event sources: the object that generated the event. For example, clicking a mouse on a button generates an event, and the button is the source of the event.
A subscriber: an object of an event, such as an application in an electronic device, is received. A subscriber may subscribe to an event at an event source and, when the event occurs at the event source, send the event to the subscriber who has subscribed to the event.
Hereinafter, embodiments of the present embodiment will be described in detail with reference to the accompanying drawings. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality" means two or more than two.
The technical solution provided in the present application is applied to an electronic device, such as a mobile phone of the electronic device, a tablet computer, a wearable device, an in-vehicle device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a Personal Digital Assistant (PDA), and any other electronic device having an operating system, and the embodiment of the present application does not limit the electronic device.
Fig. 1 shows a schematic structural diagram of an electronic device to which the present application relates.
As shown in fig. 1, the electronic device may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. It is to be understood that the illustrated structure of the present embodiment does not constitute a specific limitation to the electronic device. In other embodiments of the present application, an electronic device may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components may be used. For example, when the electronic device is a smart tv, the smart tv does not need to provide one or more of the SIM card interface 195, the camera 193, the key 190, the receiver 170B, the microphone 170C, and the earphone interface 170D. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors. In some embodiments, the electronic device may also include one or more processors 110. The controller can be a neural center and a command center of the electronic device. The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution. A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. This avoids repeated accesses, reduces the latency of the processor 110, and thus increases the efficiency of the electronic device.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc. The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device, may also be used to transmit data between the electronic device and a peripheral device, and may also be used to connect an earphone to play audio through the earphone.
It should be understood that the interface connection relationship between the modules according to the embodiment of the present invention is only an exemplary illustration, and does not limit the structure of the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like. The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in an electronic device may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier, etc. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication applied to electronic devices, including Wireless Local Area Networks (WLAN), bluetooth, Global Navigation Satellite System (GNSS), Frequency Modulation (FM), NFC, Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 150 and antenna 2 is coupled to the wireless communication module 160 so that the electronic device can communicate with the network and other devices through wireless communication techniques. The wireless communication technologies may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, GNSS, WLAN, NFC, FM, and/or IR technologies, among others. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device may implement the display function via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute instructions to generate or change display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device may implement a capture function via the ISP, camera 193, video codec, GPU, one or more display screens 194, and application processor, among others.
The ISP is used to process the data fed back by the camera 193. For example, when a photo is taken, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converting into an image visible to naked eyes. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into image signal in standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. The NPU can realize applications such as intelligent cognition of electronic equipment, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the memory capability of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, data files such as music, photos, videos, and the like are saved in the external memory card.
Internal memory 121 may be used to store one or more computer programs, including instructions. The processor 110 may execute the above-mentioned instructions stored in the internal memory 121, so as to enable the electronic device to execute the voice switching method provided in some embodiments of the present application, and various functional applications, data processing, and the like. The internal memory 121 may include a program storage area and a data storage area. Wherein, the storage program area can store an operating system; the storage area may also store one or more application programs (e.g., gallery, contacts, etc.), etc. The storage data area can store data (such as photos, contacts and the like) and the like created during the use of the electronic device. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. In some embodiments, the processor 110 may cause the electronic device to execute the voice switching method provided in the embodiments of the present application and various functional applications and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor 110.
The electronic device may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc. The audio module 170 is configured to convert digital audio information into an analog audio signal for output, and also configured to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic device answers a call or voice information, it can answer the voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking the user's mouth near the microphone 170C. The electronic device may be provided with at least one microphone 170C. In other embodiments, the electronic device may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and the like.
The headphone interface 170D is used to connect a wired headphone. The headset interface 170D may be the USB interface 130, may be an open mobile electronic device platform (OMTP) standard interface of 3.5mm, and may also be a CTIA (cellular telecommunications industry association) standard interface.
The sensors 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronics determine the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion pose of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (i.e., x, y, and z axes) may be determined by the gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyroscope sensor 180B detects a shake angle of the electronic device, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device through a reverse movement, thereby achieving anti-shake. The gyro sensor 180B may also be used for navigation, body sensing game scenes, and the like.
The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device in various directions (typically three axes). When the electronic device is at rest, the magnitude and direction of gravity can be detected. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device may measure distance by infrared or laser. In some embodiments, taking a picture of a scene, the electronic device may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light to the outside through the light emitting diode. The electronic device uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device may determine that there are no objects near the electronic device. The electronic device can detect that the electronic device is held by a user and close to the ear for conversation by utilizing the proximity light sensor 180G, so that the screen is automatically extinguished, and the purpose of saving power is achieved. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The electronic device may adaptively adjust the brightness of the display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device is in a pocket to prevent accidental touches.
A fingerprint sensor 180H (also referred to as a fingerprint recognizer) for collecting a fingerprint. The electronic equipment can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access to an application lock, fingerprint photographing, fingerprint incoming call answering and the like. Further description of fingerprint sensors may be found in international patent application PCT/CN2017/082773 entitled "method and electronic device for handling notifications", which is incorporated herein by reference in its entirety.
The touch sensor 180K may also be referred to as a touch panel. The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a touch screen. The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human vocal part vibrating the bone mass. The bone conduction sensor 180M may also contact the human pulse to receive the blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M may also be disposed in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys or touch keys. The electronic device may receive a key input, and generate a key signal input related to user settings and function control of the electronic device.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic equipment can support 1 or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic equipment realizes functions of conversation, data communication and the like through the interaction of the SIM card and the network. In some embodiments, the electronic device employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device and cannot be separated from the electronic device.
Hereinafter, the event subscription method provided by the present application will be described in detail by specific embodiments.
Referring to fig. 2, an embodiment of the present application provides an event subscription method executed in an electronic device in which a subscriber, an event source manager, and a channel manager are located, the method including:
in step 102, a subscriber in the electronic device queries IPC information of an event source in an event source manager.
The electronic equipment comprises an event source manager, wherein an event source information set is stored in the event source manager.
In one possible design, when any event source in the electronic device is initialized, the event source information of the electronic device is registered and stored in an event source manager of the electronic device, and referring to fig. 3, the event source 202 and the event source 204 of the electronic device 200 upload the event source information to the event source manager 206 of the electronic device at the time of initialization.
The event source information comprises an event source ID, a support event list and IPC information.
The event source identification information indicates the identity of the event source.
The list of supporting events describes the events that the event source can generate.
The IPC (Inter-Process Communication) information includes a Communication method supported by the event source, an IP address of the electronic device to which the event source belongs, and a port number of the event source.
Wherein, the IP address of the electronic device to which the event source belongs and the port number of the event source indicate the position of the event source.
A subscriber who subscribes to an event in an event source can access the electronic equipment to which the event source belongs through the IP address of the electronic equipment to which the event source belongs, find the port number of the event source in the electronic equipment, access the port corresponding to the port number, subscribe the event to the event source through the port in a communication mode supported by the event source and receive the event generated by the event source.
Therefore, any subscriber in the subscriber process of any application in the electronic equipment can inquire the IPC information of the required event source in the event source information set of the event source manager.
In step 104, a subscriber in the electronic device establishes a logical channel with the event source through the channel manager based on the IPC information.
Referring to fig. 3, the electronic device 200 has a channel manager 208 and a subscriber 210, and when an event is transmitted between an event source 202 and the subscriber 210, the channel manager 208 establishes a logical channel for the two, and the logical channel is an abstract entity used by the event source 202 and the subscriber 210 and is carried by a physical channel of the entity.
The physical channel is a specific physical connection, such as tcp connection, udp connection, or pipe connection. One physical channel has the capability to carry multiple logical channels.
Step 106, under the condition that the connection mode of the logical channel is the non-direct connection mode, the channel manager sets the logical channel on a first physical channel, wherein the first physical channel is a physical channel used by other subscribers in the subscriber process to which the subscriber belongs to subscribe to the event of the event source.
Because one physical channel has the capability of bearing a plurality of logical channels, in the non-direct connection mode, when a plurality of subscribers in one process are connected with the same event source, the logical channels of the plurality of subscribers can be established on the same physical channel, and the technical scheme that one physical channel is established for each subscriber to bear the logical channels in the related technology is replaced.
Referring to fig. 3, the subscriber process includes at least a subscriber 212 and a subscriber 214 in addition to the subscriber 210, and the three connect to the event source 202 by using logical channel 1, logical channel 2 and logical channel 3, respectively. And the three logical channels are all established in the physical channel 4 between the subscriber process and the event source 202.
Therefore, multiple subscribers in the same process realize the multiplexing of the physical channels, the number of the physical channels required to be established is greatly reduced, the consumption of system resources is reduced, the system is convenient to provide effective resources for other processes, and the effective utilization rate and the working efficiency of the system resources are integrally improved.
In step 108, a subscriber in the electronic device sends subscription information to the event source through a logical channel established on the first physical channel.
In step 110, a subscriber in the electronic device receives an event fed back by an event source for subscription information through a logical channel established above a first physical channel.
The subscription information comprises a subscriber ID and a list of events subscribed by the subscriber, the subscriber sends the subscription information to the event source, and the event source can send the events subscribed by the subscriber to the subscriber ID to realize the issuing of the events.
In one possible design, a subscriber in the electronic device creates a second physical channel and sets the logical channel on the second physical channel when the connection mode of the logical channel is the direct connection mode.
Under the condition that the connection mode of the logic channel is the direct connection mode, different subscribers do not multiplex the same physical channel, so that a new physical channel can be established for the subscribers in the direct connection mode.
In one possible design, the event sources include local device event sources and/or cross-device event sources.
Referring to FIG. 4, an event source 204 of an electronic device 200 may be subscribed by a subscriber 302, a subscriber 310, and a subscriber 312 of an electronic device 300, the subscriber 302, the subscriber 310, and the subscriber 312 using logical channel 5, logical channel 6, and logical channel 7, respectively, in a channel manager 306, the logical channel 5, logical channel 6, and logical channel 7 multiplexing a physical channel 8.
Therein, a subscriber 302 of the electronic device 300 queries the event source manager 304 of the electronic device 300 for IPC information of the event source 204.
The subscriber 302 of the electronic device 300 establishes a logical channel with the event source 204 through the channel manager 306 of the electronic device 300 based on the IPC information of the event source 204, and establishes the logical channel on the physical channel 8 established by the process where the subscriber 302 is located and the event source 204, so that event subscription and event distribution are performed by multiplexing the same physical channel between the cross-device event source and multiple subscribers.
When the device event source and the cross-device event source are initialized, the event source information of the device and the cross-device event source are stored into the event source information set of the electronic device where the device is located, and the event source managers of different electronic devices synchronize the event source information sets. Thus, subscribers in an electronic device can subscribe to the device event source and/or cross-device event sources.
In one possible design, an event source manager of the electronic device queries a first event source to which an event to be subscribed belongs in an event source information set of the event source manager.
An event source manager of the electronic equipment judges whether the current subscription authority of the subscriber meets a first preset condition.
Based on the condition that the current subscription authority meets the first preset condition, an event source manager of the electronic equipment inquires IPC information of the first event source in the event source information set and sends the IPC information to the subscriber so that the subscriber establishes a logic channel with the first event source according to the IPC information to subscribe and receive events.
The technical scheme is used for verifying the qualification of the subscriber.
The subscriber can send an event subscription request to the event source manager, and the event subscription request can specify an event to be subscribed or an event source to which the event to be subscribed belongs.
Then, the event source manager of the electronic device determines whether the subscriber qualifies to subscribe to the event to be subscribed and/or to subscribe to the first event source, and specifically, may determine whether the current subscription authority of the subscriber satisfies a first predetermined condition, where the first predetermined condition is a minimum condition that the current subscription authority of the subscriber needs to satisfy in a case that the subscriber qualifies to subscribe to the event to be subscribed and/or to subscribe to the first event source.
In one possible design, the first predetermined condition is: the current subscription authority is larger than or equal to the subscribeable authority of the event to be subscribed, and/or the current subscription authority is larger than or equal to the subscribeable authority of the first event source.
The current subscription authority is the subscription authority of the subscriber, the high or low of the subscription authority represents the credibility of the subscriber, the subscribeable authority of the event to be subscribed represents the lowest subscription authority which can be trusted by the event to be subscribed, and the subscribeable authority of the first event source represents the lowest subscription authority which can be trusted by the first event source.
Therefore, in the case that the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the event to be subscribed, the subscriber can be considered to reach the lowest level which can be trusted by the event to be subscribed.
Alternatively, in the case that the subscription authority of the subscriber itself is greater than or equal to the subscribeable authority of the first event source, the subscriber can be considered to reach the lowest level that can be trusted by the first event source.
Or, in the case that the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the event to be subscribed and the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the first event source, the subscriber can be considered to reach the lowest level that can be trusted by the event to be subscribed and the first event source together.
At this point, it can be determined that the subscriber qualifies to subscribe to the event to be subscribed of the first event source.
In one possible design, the event source manager of the electronic device queries a second event source meeting a predetermined filtering rule in its own event source information set.
And the event source manager of the electronic equipment judges whether the current subscription authority of the subscriber meets a second preset condition.
Based on the condition that the current subscription authority meets a second preset condition, an event source manager of the electronic equipment inquires IPC information of a second event source in an event source information set and sends the IPC information to a subscriber so that the subscriber establishes a logic channel with the second event source according to the IPC information to subscribe and receive events.
The technical scheme is used for verifying the qualification of the subscriber.
The subscriber can send an event subscription request to the event source manager, the event subscription request does not specify the event to be subscribed or the event source to which the event to be subscribed belongs, but specifies a predetermined filtering rule, or the event subscription request does not specify the event to be subscribed or the event source to which the event to be subscribed belongs, but screens out the event source of the event to be subscribed from a plurality of event sources in the event source manager depending on the predetermined filtering rule in the event source manager.
The preset screening rules can be flexibly set according to actual requirements.
For example, a subscriber may be set to subscribe to an event source in the event source list of the process, or the subscriber may be set to subscribe to the event source of the device, or the subscriber may be set to subscribe to the event source across devices. Of course, the predetermined filtering rule may also be any other filtering condition flexibly set according to actual needs.
Then, the event source manager of the electronic device determines whether the subscriber qualifies to subscribe to the event to be subscribed and/or to subscribe to the first event source, and specifically, may determine whether the current subscription authority of the subscriber satisfies a second predetermined condition, where the second predetermined condition is a minimum condition that the current subscription authority of the subscriber needs to satisfy in a case that the subscriber qualifies to subscribe to the event to be subscribed and/or to subscribe to the first event source.
In one possible design, the second predetermined condition is: the current subscription right is larger than or equal to the subscribeable right of the event to be subscribed in the second event source, and/or the current subscription right is larger than or equal to the subscribeable right of the second event source.
The current subscription authority is the subscription authority of the subscriber, the high or low of the subscription authority represents the credibility of the subscriber, the subscribeable authority of the event to be subscribed represents the lowest subscription authority which can be trusted by the event to be subscribed, and the subscribeable authority of the second event source represents the lowest subscription authority which can be trusted by the second event source.
Therefore, in the case that the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the event to be subscribed, the subscriber can be considered to reach the lowest level which can be trusted by the event to be subscribed.
Alternatively, in the case that the subscription authority of the subscriber itself is greater than or equal to the subscribeable authority of the second event source, the subscriber can be considered to reach the lowest level that can be trusted by the second event source.
Or, in the case that the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the event to be subscribed and the subscription authority of the subscriber is greater than or equal to the subscribeable authority of the second event source, the subscriber can be considered to reach the lowest level that can be trusted by the event to be subscribed and the second event source together.
At this point, it can be determined that the subscriber qualifies to subscribe to the event to be subscribed of the second event source.
Fig. 5 shows a schematic block diagram of an event subscription apparatus according to an embodiment of the present invention.
Referring to fig. 5, an embodiment of the present invention provides an event subscription apparatus 500, including: an IPC information query module 502, configured to query IPC information of an event source in an event source information set; a logic channel establishing module 504, configured to establish a logic channel with the event source based on the IPC information; a physical channel setting module 506, configured to set the logical channel on a first physical channel when a connection mode of the logical channel is a non-direct connection mode, where the first physical channel is a physical channel used by other subscribers except a current subscriber in a process of the current subscriber to subscribe to an event of the event source; an event subscription module 508, configured to send subscription information to the event source through the logical channel established on the first physical channel; an event receiving module 510, configured to receive, through the logical channel established on the first physical channel, an event fed back by the event source for the subscription information.
In one possible design, further comprising: a physical channel creation module, configured to create a second physical channel when the connection mode of the logical channel is a direct connection mode; the physical channel setting module is further configured to: and arranging the logic channel above the second physical channel.
In one possible design, further comprising: an event source information storage module, configured to store event source information of any event source to the event source information set when any event source is initialized before the IPC information of the event source is queried by the IPC information query module 502, where the event source information includes an event source ID, a supporting event list, and the IPC information.
In one possible design, the IPC information query module 502 includes: the first event source query module is used for querying a first event source to which an event to be subscribed belongs in the event source information set; the first judgment module is used for judging whether the current subscription authority meets a first preset condition or not; and the first execution module is used for inquiring the IPC information of the first event source in the event source information set based on the condition that the current subscription authority meets the first preset condition.
In one possible design, the first predetermined condition is: the current subscription authority is greater than or equal to the subscribeable authority of the event to be subscribed, and/or the current subscription authority is greater than or equal to the subscribeable authority of the first event source.
In one possible design, the IPC information query module 502 includes: the second event source query module is used for querying a second event source which accords with a preset screening rule in the event source information set; the second judgment module is used for judging whether the current subscription authority meets a second preset condition or not; and the second execution module is used for inquiring the IPC information of the second event source in the event source information set based on the condition that the current subscription authority meets the second preset condition.
In one possible design, the second predetermined condition is: the current subscription right is greater than or equal to the subscribeable right of the event to be subscribed in the second event source, and/or the current subscription right is greater than or equal to the subscribeable right of the second event source.
In one possible design, the event sources include local device event sources and/or cross-device event sources.
The event subscribing device 500 uses the scheme described in any one of fig. 1 to fig. 4, and therefore, all the technical effects described above are achieved, and are not described herein again.
In addition, an embodiment of the present application further provides a computer-readable storage medium, where instructions are stored in the computer-readable storage medium, and when the instructions are executed on an electronic device, the instructions cause the electronic device to execute the event subscription method according to any one of the foregoing implementations.
An embodiment of the present application further provides a computer program product, which, when run on an electronic device, causes the electronic device to execute the event subscription method according to any of the foregoing implementation manners.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk), among others.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that although the terms first, second, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are only used to distinguish XXX from each other. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (12)

1. An event subscription method, comprising:
inquiring IPC information of an event source in the event source information set;
establishing a logic channel with the event source based on the IPC information;
under the condition that the connection mode of the logic channel is a non-direct connection mode, the logic channel is arranged on a first physical channel, and the first physical channel is a physical channel used by other subscribers except the current subscriber in the subscriber process for subscribing the event of the event source;
sending subscription information to the event source through the logical channel established on the first physical channel;
receiving the event fed back by the event source for the subscription information through the logical channel established on the first physical channel.
2. The event subscription method according to claim 1, further comprising:
under the condition that the connection mode of the logic channel is a direct connection mode, a second physical channel is newly built;
and arranging the logic channel above the second physical channel.
3. The event subscription method according to claim 1 or 2, wherein before the step of querying IPC information of event sources in the event source information set, further comprising:
when any event source is initialized, storing event source information of the event source into the event source information set, wherein the event source information comprises an event source ID, a support event list and the IPC information.
4. The event subscription method according to claim 1 or 2, wherein the step of querying the event source IPC information in the event source information set comprises:
inquiring a first event source to which an event to be subscribed belongs in the event source information set;
judging whether the current subscription authority meets a first preset condition or not;
and inquiring IPC information of the first event source in the event source information set based on the condition that the current subscription authority meets the first preset condition.
5. The event subscription method according to claim 4, wherein said first predetermined condition is:
the current subscription right is greater than or equal to the subscribeable right of the event to be subscribed, and/or,
the current subscription rights are greater than or equal to the subscribeable rights of the first event source.
6. The event subscription method according to claim 1 or 2, wherein the step of querying the event source IPC information in the event source information set comprises:
querying a second event source which accords with a preset screening rule in the event source information set;
judging whether the current subscription authority meets a second preset condition or not;
and inquiring IPC information of the second event source in the event source information set based on the condition that the current subscription authority meets the second predetermined condition.
7. The event subscription method according to claim 6, wherein said second predetermined condition is:
the current subscription right is greater than or equal to the subscribeable right of the event to be subscribed in the second event source, and/or,
the current subscription right is greater than or equal to the subscribeable right of the second event source.
8. The event subscription method according to claim 1,
the event source comprises the device event source and/or the cross-device event source.
9. An event subscription device, comprising:
the IPC information query module is used for querying the IPC information of the event source in the event source information set;
a logic channel establishing module for establishing a logic channel with the event source based on the IPC information;
a physical channel setting module, configured to set the logical channel on a first physical channel when a connection mode of the logical channel is a non-direct connection mode, where the first physical channel is a physical channel used by other subscribers except a current subscriber in a process of the current subscriber to subscribe to an event of the event source;
the event subscription module is used for sending subscription information to the event source through the logic channel established on the first physical channel;
and the event receiving module is used for receiving the event fed back by the event source aiming at the subscription information through the logic channel established on the first physical channel.
10. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor, the instructions being arranged to perform the method of any of the preceding claims 1 to 8.
11. A computer-readable storage medium having stored thereon computer-executable instructions for performing the method flow of any of claims 1-8.
12. A computer program product, characterized in that it causes an electronic device to execute the method procedure of any of claims 1 to 8 when it is run on the electronic device.
CN201911243475.2A 2019-12-06 2019-12-06 Event subscription method and electronic equipment Active CN112929870B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911243475.2A CN112929870B (en) 2019-12-06 2019-12-06 Event subscription method and electronic equipment
PCT/CN2020/133787 WO2021110117A1 (en) 2019-12-06 2020-12-04 Event subscription method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911243475.2A CN112929870B (en) 2019-12-06 2019-12-06 Event subscription method and electronic equipment

Publications (2)

Publication Number Publication Date
CN112929870A true CN112929870A (en) 2021-06-08
CN112929870B CN112929870B (en) 2022-07-22

Family

ID=76161689

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911243475.2A Active CN112929870B (en) 2019-12-06 2019-12-06 Event subscription method and electronic equipment

Country Status (2)

Country Link
CN (1) CN112929870B (en)
WO (1) WO2021110117A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412596A (en) * 2022-08-05 2022-11-29 深圳市汇深网信息科技有限公司 Travel message subscription method, device, equipment and medium based on travel management

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3079267A1 (en) * 2013-12-25 2016-10-12 Huawei Technologies Co., Ltd. Data transmission method and device
CN106888078A (en) * 2016-12-26 2017-06-23 中国移动通信有限公司研究院 The data transmission method and device of forward pass network
CN109995800A (en) * 2017-12-29 2019-07-09 中国科学院沈阳自动化研究所 The middleware services system and method applied towards dynamic realtime in industrial SDN network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE60136168D1 (en) * 2001-06-28 2008-11-27 Nokia Corp Method for enabling transmission between processes and processing system using the same
US20100017513A1 (en) * 2008-07-16 2010-01-21 Cray Inc. Multiple overlapping block transfers
CN110515706B (en) * 2019-08-16 2022-07-08 苏州浪潮智能科技有限公司 Request processing method, device, equipment and readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3079267A1 (en) * 2013-12-25 2016-10-12 Huawei Technologies Co., Ltd. Data transmission method and device
CN106888078A (en) * 2016-12-26 2017-06-23 中国移动通信有限公司研究院 The data transmission method and device of forward pass network
CN109995800A (en) * 2017-12-29 2019-07-09 中国科学院沈阳自动化研究所 The middleware services system and method applied towards dynamic realtime in industrial SDN network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412596A (en) * 2022-08-05 2022-11-29 深圳市汇深网信息科技有限公司 Travel message subscription method, device, equipment and medium based on travel management
CN115412596B (en) * 2022-08-05 2024-01-05 深圳市汇深网信息科技有限公司 Travel message subscription method, device, equipment and medium based on travel management

Also Published As

Publication number Publication date
WO2021110117A1 (en) 2021-06-10
CN112929870B (en) 2022-07-22

Similar Documents

Publication Publication Date Title
CN110138937B (en) Call method, device and system
WO2020041952A1 (en) Method and electronic apparatus for controlling express delivery cabinet on the basis of express delivery message
CN112289313A (en) Voice control method, electronic equipment and system
CN111369988A (en) Voice awakening method and electronic equipment
CN111628916B (en) Method for cooperation of intelligent sound box and electronic equipment
CN113923230B (en) Data synchronization method, electronic device, and computer-readable storage medium
CN112312366B (en) Method, electronic equipment and system for realizing functions through NFC (near field communication) tag
WO2020216098A1 (en) Method for providing forwarding service across electronic apparatuses, apparatus, and system
CN112860428A (en) High-energy-efficiency display processing method and equipment
WO2020019355A1 (en) Touch control method for wearable device, and wearable device and system
CN113992663B (en) Method for sending file, electronic device and readable storage medium
CN113676339A (en) Multicast method, device, terminal equipment and computer readable storage medium
CN112929870B (en) Event subscription method and electronic equipment
CN113496477A (en) Screen detection method and electronic equipment
CN112929854B (en) Event subscription method and electronic equipment
CN115134404B (en) Method for managing push connection and electronic equipment
CN114257680B (en) Caller identification method, user equipment, storage medium and electronic equipment
US11977946B2 (en) Method for automatically activating NFC application and terminal
CN114116610A (en) Method, device, electronic equipment and medium for acquiring storage information
CN115248693A (en) Application management method and electronic equipment
CN115525366A (en) Screen projection method and related device
CN112822246A (en) Equipment identification method and equipment
CN110737916A (en) Communication terminal and processing method
WO2022037412A1 (en) Method and apparatus for managing internet of things devices
CN116094861A (en) Method, device and system for remotely controlling electronic device

Legal Events

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