Disclosure of Invention
In view of the above, one or more embodiments of the present disclosure provide a method, an apparatus, and a device for simulating broadcast notification in a client.
In order to achieve the above purpose, one or more embodiments of the present disclosure provide the following technical solutions:
in one aspect, a method for simulating broadcasting notification in a client is provided, which includes:
the method comprises the steps that a simulation end is connected with a client, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the simulation terminal sends data for the client terminal to generate a broadcast notification to the client terminal, and the broadcast notification is broadcasted to a broadcast monitoring object in the client terminal by the client terminal.
In another aspect, a method for simulating broadcasting notification in a client is provided, which includes:
the method comprises the steps that a client side is connected with a simulation end, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the client receives data which is sent by the simulation end and used for the client to generate a broadcast notification;
the client generates the broadcast notification by using the data;
and the client broadcasts the broadcast notification to a broadcast monitoring object in the client.
In one aspect, an apparatus for simulating a broadcast notification in a client is provided, which is applied to a simulation end that stores data used to generate the broadcast notification, and the apparatus includes:
the connection establishing module is used for establishing connection with the client;
and the sending module is used for sending data for the client to generate a broadcast notification to the client after the connection is successfully established, wherein the broadcast notification is broadcasted to a broadcast monitoring object in the client by the client.
In another aspect, an apparatus for simulating broadcasting notification in a client is provided, which is applied to the client, and includes:
the connection establishing module is connected with the analog end, and the analog end stores data used for generating broadcast notification;
the receiving module is used for receiving data which is sent by the analog end and used for the client to generate a broadcast notification after the connection is successfully established;
a generation module that generates the broadcast notification using the data;
and the broadcast module is used for broadcasting the broadcast notification to the broadcast monitoring object in the client.
In one aspect, an analog end device is provided, which includes:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to:
the method comprises the steps that a simulation end is connected with a client, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the simulation terminal sends data for the client terminal to generate a broadcast notification to the client terminal, and the broadcast notification is broadcasted to a broadcast monitoring object in the client terminal by the client terminal.
In yet another aspect, a client device is provided, comprising:
a processor;
a memory for storing processor-executable instructions;
the processor is configured to:
the method comprises the steps that a client side is connected with a simulation end, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the client receives data which is sent by the simulation end and used for the client to generate a broadcast notification;
the client generates the broadcast notification by using the data;
and the client broadcasts the broadcast notification to a broadcast monitoring object in the client.
According to the technical scheme, the data used for generating the broadcast notification is stored by the analog end, and after the analog end is connected with the client, the data used for generating the broadcast notification by the client can be sent to the client by the analog end, so that the client broadcasts the broadcast notification to the broadcast monitoring object in the client. According to the scheme, the user can be prevented from operating at the client (namely the developed or tested App) to trigger the broadcast notification, so that the operation of the user in the development and test process is simplified, and the development and test efficiency of the App is improved.
Detailed Description
Fig. 1 shows an exemplary scenario in which: the system comprises a client device provided with a client (namely an App to be tested) and an analog end device provided with an analog end application program (used for providing data capable of generating broadcast notification in the App). The client device/analog device may include, but is not limited to, various Personal Computers (PCs), mobile phones, and the like. The analog end application program can have the functions of editing, displaying and managing data for generating broadcast notification by a user and the like.
Fig. 2 shows a flow of a method (performed by a simulation end device) for simulating broadcast notification in a client according to an exemplary embodiment. As shown in fig. 2, in one embodiment, the method includes the steps of:
in step 101, an analog side establishes a connection with a client, wherein the analog side stores data used for generating a broadcast notification.
In one embodiment, the analog end and the client end can establish connection through a Dynamic Link Library (DLL) integrated in the client end. Of course, the data communication mode between the client and the simulation end includes but is not limited to: socket, USB, TCP/IP protocol, Bluetooth protocol, etc.
In step 102, after the connection is successfully established, the analog end sends data for the client to generate a broadcast notification to the client, and the broadcast notification is broadcasted to a broadcast monitoring object in the client by the client.
In one embodiment, the simulation terminal may provide a user interface for editing the data, and the simulation terminal may store the edited data. The development personnel of the App can edit various broadcast notification data according to the actual service requirements and store the data to the analog terminal for later use. In addition, the developer can manage all data at the simulation end (for example, add, delete, change, check and the like for the data).
In an embodiment, the client may be an application installed on the mobile operating system iOS. In the iOS, the iOS App needs to use the Notifications (a notification mechanism of the iOS) of the iOS, wherein the iOS App may include a plurality of objects (i.e. broadcast initiation objects) capable of sending broadcast Notifications and objects (i.e. broadcast listening objects) capable of receiving broadcast Notifications. The key to Notifications is a Notification Center (Notification Center) that manages registration and deregistration of broadcast listening objects, and transmission and reception of broadcast Notifications. For the broadcast initiating object, it does not need to care which broadcast monitoring objects need to monitor the specific broadcast notification sent by the broadcast initiating object, and for the broadcast monitoring objects, it does not need to care which broadcast initiating object sends the specific broadcast notification needed to be monitored by the broadcast monitoring objects, thereby reducing the coupling degree between the broadcast initiating object and the broadcast monitoring objects. In some embodiments, each iOS App may have a notification center that broadcasts certain broadcast notifications within the App after they are received, without concern about which broadcast listening objects or broadcast messages are received. After receiving the broadcast notification, the broadcast listener in App may obtain some information encapsulated therein from the broadcast notification, and then perform corresponding processing actions according to the information. Of course, the notification mechanism is not limited to the Notifications function of iOS.
In one embodiment, the above step 102 can be embodied as the following process:
the analog end responds to a specific operation (such as selecting a specific broadcast name in a list in the analog end and clicking to start to send out a broadcast) which is made by a user at the analog end and used for triggering a broadcast notification, acquires stored data (such as local storage or storage in a memory or remote storage) used for generating the broadcast notification for the client, and sends the acquired data to the client. The data for generating various types of broadcast notifications may include, but is not limited to: the name of the broadcast (which is used to indicate a broadcast notification, typically a character string), the content of the broadcast (e.g., the object that the broadcast needs to carry, some additional information, etc.). Of course, the manner in which the user triggers the broadcast notification is not limited, for example: one operation of the user at the analog end can trigger a plurality of broadcast notifications, or be automatically triggered (such as timing trigger) by the analog end, and the like.
Fig. 3 shows a flow of a method (performed by a client device) for simulating an intra-client broadcast notification, according to the process of fig. 2, the method includes the following steps:
in step 201, the client establishes a connection with the analog end, wherein the analog end stores data used for generating the broadcast notification.
In step 202, after the connection is successfully established, the client receives data sent by the analog end and used for the client to generate a broadcast notification.
In step 203, the client generates the broadcast notification using the data, wherein the process of "generating" may be to encapsulate the received data in a message.
In step 204, the client broadcasts the broadcast notification to the broadcast listening object in the client.
The number of the broadcast monitoring objects receiving the broadcast notification is greater than or equal to 0, depending on the specific service of the App. In fact, the client broadcasts the generated broadcast notification in the App through its broadcast center, and does not need to care which listening objects actually receive the broadcast notification, and the objects receiving the broadcast can perform corresponding processing actions. For App developers, after the simulation end sends out the data, the test results can be obtained by observing the processing actions of the App.
Based on the embodiments shown in fig. 2 and fig. 3, the following effects can be achieved:
the App developer can conveniently trigger any broadcast notification required to be used through the analog end, and can edit data used for generating the broadcast notification at the analog end to meet different service requirements. According to the scheme, the situation that a user needs to operate at the App end to trigger various broadcast notifications in the past App development process is avoided, so that the operation of the user in the development and test process is simplified, and the App development and test efficiency is improved. Particularly, for some broadcast notifications which need a relatively long operation link (i.e. a series of operations) to start, the scheme can be triggered by one key after the analog end edits data. By the aid of the scheme, development and test of App can cover all scenes (including some special scenes).
Corresponding to the above method, there is also provided an apparatus for simulating in-client broadcast notification, which may be implemented by software.
Fig. 4 is a block diagram illustrating an apparatus 400 (applied at the analog end) for simulating broadcast notification in a client according to an exemplary embodiment. As shown in fig. 4, in an embodiment, the analog end stores data used for generating a broadcast notification, and the apparatus 400 includes: a connection establishing module 410 and a sending module 420, wherein:
the connection establishment module 410 is configured to: and establishing connection with the client.
The sending module 420 is configured to: and after the connection is successfully established, sending data for the client to generate a broadcast notification to the client, wherein the broadcast notification is broadcasted to a broadcast monitoring object in the client by the client.
In one embodiment, the apparatus 400 further provides a user interface for editing data for generating the broadcast notification, and stores the edited data.
In an embodiment, the sending module 410 may be configured to:
and responding to a specific operation which is made by a user through the user interface and is used for triggering the broadcast notification, acquiring the stored data used for generating the broadcast notification by the client, and sending the acquired data to the client.
Fig. 5 is a block diagram illustrating an apparatus 500 (application at a client) for simulating broadcast notification within the client according to an exemplary embodiment. As shown in fig. 5, in one embodiment, the apparatus 500 comprises: a connection establishing module 510, a receiving module 520, a generating module 530, and a broadcasting module 540, wherein:
the connection establishment module 510 is configured to: establishing connection with an analog terminal, wherein the analog terminal stores data used for generating broadcast notification;
the receiving module 520 is configured to: after the connection is successfully established, receiving data which is sent by the analog end and used for generating a broadcast notification by the client;
the generation module 530 is configured to: generating the broadcast notification using the data;
the broadcast module 540 is configured to: and broadcasting the broadcast notification to a broadcast monitoring object in the client.
As shown in fig. 6, one or more embodiments of the present specification provide a client device or an analog device, which may include a processor, an internal bus, a network interface, a storage (including a memory and a non-volatile storage), and may also include hardware required for other services. A processor may be one or more instances of a Central Processing Unit (CPU), processing unit, processing circuit, processor, Application Specific Integrated Circuit (ASIC), microprocessor, or other processing logic that may execute instructions. The processor reads the corresponding program from the nonvolatile memory into the memory and then runs the program. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
In an embodiment, for an analog end device, the processor thereof may be configured to:
the method comprises the steps that a simulation end is connected with a client, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the simulation terminal sends data for the client terminal to generate a broadcast notification to the client terminal, and the broadcast notification is broadcasted to a broadcast monitoring object in the client terminal by the client terminal.
In an embodiment, for a client device, its processor may be configured to:
the method comprises the steps that a client side is connected with a simulation end, and the simulation end stores data used for generating broadcast notifications;
after the connection is successfully established, the client receives data which is sent by the simulation end and used for the client to generate a broadcast notification;
the client generates the broadcast notification by using the data;
and the client broadcasts the broadcast notification to a broadcast monitoring object in the client.
The embodiments in the present specification are described in a progressive manner, and the same/similar parts in the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. Especially, for the analog end device/client device embodiment and the apparatus embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and for the relevant points, refer to the partial description of the method embodiment.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the various elements may be implemented in the same one or more software and/or hardware implementations in implementing one or more embodiments of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of the storage medium of the computer include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM)
(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, compact disc read-only memory (CD-ROM), Digital Versatile Disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (transmyedia) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of the present specification should be included in the scope of claims of one or more embodiments of the present specification.