CN109218393B - Push implementation method, device, equipment and computer storage medium - Google Patents

Push implementation method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN109218393B
CN109218393B CN201810816598.XA CN201810816598A CN109218393B CN 109218393 B CN109218393 B CN 109218393B CN 201810816598 A CN201810816598 A CN 201810816598A CN 109218393 B CN109218393 B CN 109218393B
Authority
CN
China
Prior art keywords
push
sdk
host application
server
attribute information
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.)
Active
Application number
CN201810816598.XA
Other languages
Chinese (zh)
Other versions
CN109218393A (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.)
Baidu Online Network Technology Beijing Co Ltd
Original Assignee
Baidu Online Network Technology Beijing 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 Baidu Online Network Technology Beijing Co Ltd filed Critical Baidu Online Network Technology Beijing Co Ltd
Priority to CN201810816598.XA priority Critical patent/CN109218393B/en
Publication of CN109218393A publication Critical patent/CN109218393A/en
Application granted granted Critical
Publication of CN109218393B publication Critical patent/CN109218393B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention provides a push implementation method, which is executed in a host application and comprises the following steps: the host application sends the attribute information of the terminal equipment to the first server side; receiving a pushed Software Development Kit (SDK) which is sent by the first server and corresponds to the attribute information of the terminal equipment; loading and running the push SDK; and receiving service data from the second server side through the push SDK. The invention provides a push implementation method, which is executed at a server side and comprises the following steps: the first server receives attribute information of the terminal equipment sent by a host application, and sends a push SDK (software development kit) corresponding to the attribute information of the terminal equipment to the host application after obtaining the push SDK; and the second server side acquires service data and sends the service data to the host application through a push channel. The invention can reduce the increase of the size of the host application installation package by the push SDK.

Description

Push implementation method, device, equipment and computer storage medium
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of computer application technologies, and in particular, to a method, an apparatus, a device, and a computer storage medium for implementing push.
[ background of the invention ]
In order to enable applications to use the high-priority push capability provided by manufacturers on terminal devices of different manufacturers when developing applications, especially under an Android operating system, push SDKs (Software Development kits) of multiple manufacturers are generally integrated in applications. In the actual operation process, because one terminal device cannot be produced by a plurality of manufacturers at the same time, at most one manufacturer's push SDK is effective in the application program operated in the same terminal device. Therefore, the manner of integrating the push SDKs of multiple vendors into the application in the prior art may make the installation package of the application too large.
[ summary of the invention ]
The invention provides a method, a device and equipment for realizing pushing and a computer storage medium, which are used for reducing the increase of the size of a host application installation package caused by pushing an SDK.
The technical scheme adopted by the invention for solving the technical problem is to provide a push implementation method, which is executed in a host application and comprises the following steps: the host application sends the attribute information of the terminal equipment to the first server side; receiving a pushed Software Development Kit (SDK) which is sent by the first server and corresponds to the attribute information of the terminal equipment; loading and running the push SDK; and receiving service data from the second server side through the push SDK.
According to a preferred embodiment of the present invention, the attribute information of the terminal device includes: at least one of model information of the terminal device, manufacturer information of the terminal device, or identification code information of the terminal device.
According to a preferred embodiment of the invention, the method further comprises: the host application provides a component with the same name as the component to be registered in the push SDK as an agent component, and registers the agent component in advance; and enabling the pushing SDK to normally operate through the proxy component.
According to a preferred embodiment of the present invention, the enabling, by the proxy component, the push SDK to operate normally includes: the host application acquires a life cycle event of the operating system calling agent component; and calling a life cycle method of a corresponding actual component in the pushing SDK by the proxy component according to the life cycle event so that the pushing SDK normally operates.
According to a preferred embodiment of the present invention, receiving service data from the second server side by the push SDK includes: the host application establishes a push channel with the second server through the push SDK; and receiving service data from the second server through the push channel.
According to a preferred embodiment of the present invention, the service data includes a pass-through message; the method further comprises the following steps: and after the appearance of the notification bar of the transparent transmission message is subjected to consistency processing, displaying the transparent transmission message.
The technical scheme adopted by the invention for solving the technical problem is to provide a push implementation method, which is executed at a server side and comprises the following steps: the first server receives attribute information of the terminal equipment sent by a host application, and sends a push SDK (software development kit) corresponding to the attribute information of the terminal equipment to the host application after obtaining the push SDK; and the second server side acquires service data and sends the service data to the host application.
According to a preferred embodiment of the present invention, the obtaining of the push SDK corresponding to the attribute information of the terminal device includes: and the first server determines the push SDK corresponding to the received attribute information of the terminal equipment according to the pre-stored corresponding relation between the attribute information of the terminal equipment and the push SDK.
According to a preferred embodiment of the present invention, sending the service data to the host application comprises: the second server determines a push channel corresponding to the host application according to a pre-stored corresponding relationship between attribute information of the terminal device and the push channel; and sending service data to the host application according to the determined push channel.
According to a preferred embodiment of the invention, the method further comprises: the second server end translates the acquired notification bar message into a transparent transmission message; and sending the transparent transmission message obtained by translation to the host application through a push channel.
The technical solution adopted by the present invention to solve the technical problem is to provide a push implementation device, which is located in a host application, and the device includes: the first sending unit is used for sending the attribute information of the terminal equipment to the first server side; the first receiving unit is used for receiving a pushed Software Development Kit (SDK) which is sent by the first server and corresponds to the attribute information of the terminal equipment; the processing unit is used for loading and operating the pushing SDK; and the second receiving unit is used for receiving the service data from the second server through the push SDK.
According to a preferred embodiment of the present invention, the processing unit is further configured to: providing a component with the same name as the component to be registered in the push SDK as an agent component, and registering the agent component in advance; and enabling the pushing SDK to normally operate through the proxy component.
According to a preferred embodiment of the present invention, the processing unit, through the proxy component, when the push SDK runs normally, specifically executes: acquiring a life cycle event of an operating system calling agent component; and calling a life cycle method of a corresponding actual component in the pushing SDK by the proxy component according to the life cycle event so that the pushing SDK normally operates.
According to a preferred embodiment of the present invention, when the second receiving unit receives the service data from the second server by using the push SDK, the following steps are specifically performed: establishing a push channel with the second server side through the push SDK; and receiving service data from the second server through the push channel.
According to a preferred embodiment of the present invention, the service data includes a pass-through message; the second receiving unit is further configured to perform: and after the appearance of the notification bar of the transparent transmission message is subjected to consistency processing, displaying the transparent transmission message.
The technical solution adopted by the present invention to solve the technical problem is to provide a push implementation device, located in a server, the device including: the second sending unit is used for the first server side to receive the attribute information of the terminal equipment sent by the host application, and after the corresponding push SDK is obtained according to the attribute information of the terminal equipment, the push SDK is sent to the host application; and the third sending unit is used for the second server side to obtain the service data and send the service data to the host application.
According to a preferred embodiment of the present invention, when the second sending unit obtains the push SDK corresponding to the attribute information of the terminal device according to the attribute information of the terminal device, the following steps are specifically executed: and determining the push SDK corresponding to the received attribute information of the terminal equipment according to the corresponding relation between the attribute information of the terminal equipment and the push SDK which is stored in advance.
According to a preferred embodiment of the present invention, when the third sending unit sends the service data to the host application, the following steps are specifically executed: determining a push channel corresponding to the host application according to a pre-stored corresponding relationship between attribute information of the terminal equipment and the push channel; and sending service data to the host application according to the determined push channel.
According to the technical scheme, the push SDK is dynamically acquired from the server side through the attribute information of the terminal equipment acquired by the host application, and after the acquired push SDK is loaded and operated, the corresponding service data can be received, so that the integration of a plurality of push SDKs in the host application is avoided, and the purpose of reducing the increase of the push SDK to the size of the host application installation package is realized.
[ description of the drawings ]
Fig. 1 is a flowchart of a method for implementing push executed in a host application according to an embodiment of the present invention;
fig. 2 is a flowchart of a method implemented by a server for implementing push according to an embodiment of the present invention;
fig. 3 is a diagram illustrating an apparatus for implementing push executed by a host application according to an embodiment of the present invention;
fig. 4 is a diagram illustrating an apparatus for implementing push executed at a server according to an embodiment of the present invention;
fig. 5 is a block diagram of a computer system/server according to an embodiment of the invention.
[ detailed description ] embodiments
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in detail with reference to the accompanying drawings and specific embodiments.
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 the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
Fig. 1 is a diagram of an implementation method of push according to an embodiment of the present invention, executed in a host application, and as shown in fig. 1, the method includes:
in 101, the host application sends the attribute information of the terminal device to the first server.
In this step, the host application first obtains the attribute information of the terminal device, and then sends the obtained attribute information of the terminal device to the first server.
Specifically, the attribute information of the terminal device may include at least one of model information of the terminal device, vendor information of the terminal device, identification code information of the terminal device, and the like. The obtained attribute information is used for determining the push SDK corresponding to the attribute information at the first server side. In addition, the terminal device in the present invention may be a smart phone, a tablet computer, a smart home device, a wearable device, etc. running an Android operating system or an ios operating system, and the present invention is explained by taking a terminal device running an Android operating system as an example.
It is to be understood that the present invention may be implemented by an SDK integrated in a host application. That is, the prior art is to integrate the push SDK of each vendor in the host application in advance; in the invention, the host application does not integrate the push SDK of the manufacturer in advance, but integrates the SDK provided by the invention.
That is, the SDK integrated in the host application of the present invention does not include a core function module, and the core function module is dynamically loaded from the server side in the form of a plug-in SDK, so the plug-in SDK is referred to as a push SDK in the present invention. Wherein, the core function module includes at least: the system comprises a push management module and a push function module, wherein the push function module further comprises a starting module, a data channel module, a message event distribution module and the like.
In addition, before the host application sends the attribute information of the terminal device to the first server, the method may further include: the host application determines whether a push SDK exists locally, and if not, the attribute information of the terminal equipment is sent to the first server side; if the push SDK exists locally, the version of the local push SDK is compared with that of the first server side, and if the push SDK of the first server side has a new version, the attribute information of the terminal equipment is sent to the first server side to obtain the push SDK of the latest version; if the push SDK of the first server does not have a new version, the process of this embodiment is ended.
At 102, a pushed software development kit SDK corresponding to the attribute information of the terminal device and sent by the first server is received.
In this step, after sending the attribute information of the terminal device to the first server side in step 101, receiving a pushed SDK (Software Development Kit) corresponding to the attribute information of the terminal device, which is returned by the first server side. And the push SDK received by the host application is the push SDK of the manufacturer of the corresponding terminal equipment. In addition, the push SDK obtained by the host application from the first server in this step is a compressed packet of the push SDK, and the compressed packet includes a core function module of the push SDK.
In 103, the push SDK is loaded and run.
In this step, the host application loads the push SDK acquired in step 102, and then enables the push SDK to normally operate through the proxy component.
Before the host application loads the push SDK obtained from the first server, the method further includes: and performing security check on the file in the push SDK, such as MD5 verification, signature comparison and the like, so as to ensure the security of the downloaded file. And if the security check is passed, loading the push SDK, otherwise, not loading.
Specifically, when the host application loads the push SDK, the host application may: the method comprises the steps of firstly converting jar files in the pushed SDK into dex files, and then loading the dex files through a ClassLoader, so that the pushing SDK is loaded by a host application.
The dex file is an executable file of the android system, and contains all operation instructions and runtime data of the application program. The so file is a dynamic library file, which is a binary file.
In the prior art, since the host application integrates the push SDK of the vendor in advance, the components integrated in the push SDK of the vendor can be registered in advance. In the invention, because the push SDK of the manufacturer is dynamically acquired from the cloud, the components integrated in the push SDK of the manufacturer cannot be registered in advance, and when the components integrated in the push SDK of the manufacturer cannot be registered, the push SDK of the loaded manufacturer cannot operate normally.
Thus, the present invention enables the push SDK to function properly through the proxy component provided in the host application. The proxy component is a component with the same name provided by the host application for the component integrated in the push SDK, and is registered in advance.
In this step, when the pushing SDK is normally operated through the proxy component, the following method may be adopted: the host application acquires a life cycle event of the operating system calling agent component; and calling the life cycle method of the corresponding actual component in the pushing SDK by the proxy component according to the life cycle event, so that the pushing SDK normally operates. The life cycle method of the operating system calling the proxy component is transmitted to the actual component in the pushing SDK, and the life cycle method is equal to the life cycle method of the actual component in the pushing SDK directly called by the operating system, so that the pushing SDK which is dynamically loaded can normally run.
The components which are integrated in the push SDK and need to be registered comprise an Activity component, a Service component, a Broadcast Receiver component and a Content Provider component. The lifecycle method of the component is a function method corresponding to each component, for example, the lifecycle method of the Service component is a function method such as onCreat, onDestroy, onBind, etc., and the lifecycle method of the Activity component is: onCreat, onStart, onPause, and the like.
After the push SDK is loaded and normally operates, the host application establishes connection with the push channel, so that the service data can be received through the established push channel.
In 104, service data is received from the second server side through the push SDK.
In this step, the host application receives the service data sent by the second server through the push SDK that normally operates in step 103, and performs display. The service data received and displayed by the host application from the second server side comprises one of notification bar messages and transparent transmission messages.
When the host application receives the service data from the second server by pushing the SDK, the following method may be adopted: the host application establishes a push channel with the second server end through the push SDK; and receiving the service data sent by the second server through the established push channel. The push channel established between the host application and the second server is a system-level push channel corresponding to the terminal device, and the host application can receive corresponding service data even when the host application is in a closed state.
For example, if the terminal device where the host application is located is a millet mobile phone, the push SDK obtained from the first server is the push SDK of the millet device, and after the host application is loaded and the push SDK of the millet device normally operates, a system-level push channel of the millet device can be established with the second server.
When the host application receives the transparent transmission message sent by the second server, the method further comprises the following steps: and the host application performs consistency processing on the appearance of the notification bar on the transparent transmission message, so that the push messages displayed by the host application in different vendor equipment have consistent appearance of the notification bar. Therefore, the application developer does not need to adapt to the appearances of the notification bars for displaying the push messages of different manufacturer devices, and the push efficiency is improved.
Fig. 2 is a method for implementing push according to an embodiment of the present invention, which is executed on a server side, and as shown in fig. 2, the method includes:
in 201, a first server receives attribute information of a terminal device sent by a host application, and sends a push SDK to the host application after obtaining a corresponding push SDK according to the attribute information.
In this step, the first server side may store the corresponding relationship between the attribute information of each terminal device and the push SDK in advance, so that, according to the pre-stored corresponding relationship, after receiving the attribute information of the terminal device sent by the host application, the first server side can determine the push SDK corresponding to the received attribute information, and further send the obtained push SDK to the host application.
In 202, the second server obtains service data and sends the service data to the host application.
In this step, the host application developer publishes the service data at the second server, and the second server pushes the service data published by the host application developer to the host application.
When the host application developer issues the service data at the second server, the push channel may be selected in advance, that is, the second server pushes the service data to the host application on the terminal device of the specific manufacturer through the push channel selected by the host application developer. The host application developer may not select, and the second server automatically determines the push channel corresponding to the host application according to the attribute information of the terminal device where the host application is located, and then pushes the push message to the host application on the terminal device of the specific manufacturer through the determined push channel.
For example, if the push channel selected by the host application developer is the push channel of the millet device, the second server sends the service data to the host application of the millet device through the push channel of the millet device; and if the push channel selected by the host application developer is the Huawei equipment push channel, the second server side sends the service data to the Huawei equipment host application through the Huawei equipment push channel. And if the terminal equipment where the host application is located is the millet equipment, the service data is sent to the host application of the millet equipment through a push channel of the millet equipment automatically selected by the second server.
It can be understood that the first server side and the second server side may be the same server side or different server sides. If the server side is different, the first server side can send the attribute information of the terminal device where the host application is located to the second server side, so that the second server side can determine the corresponding push channel according to the attribute information of the terminal device conveniently. The attribute information of the terminal device can also be sent to the second server by the host application. It can be understood that the second server side stores in advance a corresponding relationship between the attribute information of each terminal device and each push channel.
In addition, if the service data issued by the host application developer at the second server is a notification bar message, the method may further include: and the second server side translates the notification bar message issued by the host application developer into an unvarnished message and then sends the unvarnished message to the host application through a push channel.
Fig. 3 is a block diagram of an apparatus for implementing push executed by a host application according to an embodiment of the present invention, as shown in fig. 3, the apparatus includes: a first transmitting unit 31, a first receiving unit 32, a processing unit 33 and a second receiving unit 34.
The first sending unit 31 is configured to send the attribute information of the terminal device to the first server.
The first sending unit 31 first obtains the attribute information of the terminal device, and then sends the obtained attribute information of the terminal device to the first server.
Specifically, the attribute information of the terminal device acquired by the first transmitting unit 31 may include at least one of model information of the terminal device, vendor information of the terminal device, identification code information of the terminal device, and the like. The obtained attribute information is used for determining the push SDK corresponding to the attribute information at the first server side.
In addition, before the first sending unit 31 sends the attribute information of the terminal device to the first server, the method may further include: determining whether a push SDK exists locally, and if not, sending the attribute information of the terminal equipment to a first server side; if the push SDK exists locally, the version of the local push SDK is compared with that of the first server side, and if the push SDK of the first server side has a new version, the attribute information of the terminal equipment is sent to the first server side to obtain the push SDK of the latest version; if the push SDK of the first server does not have a new version, the process of this embodiment is ended.
A first receiving unit 32, configured to receive the pushed software development kit SDK sent by the first server and corresponding to the attribute information of the terminal device.
The first receiving unit 32 is configured to receive a pushed SDK (Software Development Kit) corresponding to the attribute information of the terminal device, which is returned by the first server, after the first sending unit 31 sends the attribute information of the terminal device to the first server. The push SDK received by the first receiving unit 32 is a push SDK of a manufacturer of the corresponding terminal device. In addition, the push SDK received by the first receiving unit 32 from the first server is a compressed packet of the push SDK, where the compressed packet includes a core function module of the push SDK.
And the processing unit 33 is configured to load and run the push SDK.
The processing unit 33 loads the push SDK received by the first receiving unit 32, and then causes the push SDK to operate normally through the proxy component.
The processing unit 33 further includes, before the push SDK obtained from the first server side: and performing security check on the file in the push SDK, such as MD5 verification, signature comparison and the like, so as to ensure the security of the downloaded file. And if the security check is passed, loading the push SDK, otherwise, not loading.
Specifically, when the processing unit 33 loads the push SDK, the following method may be used: the method comprises the steps of firstly converting jar files in the pushed SDK into dex files, and then loading the dex files through a ClassLoader, so that the pushing SDK is loaded by a host application.
The dex file is an executable file of the android system, and contains all operation instructions and runtime data of the application program. The so file is a dynamic library file, which is a binary file.
The processing unit 33 may use the following method to make the push SDK run normally through the proxy component: acquiring a life cycle event of an operating system calling agent component; and calling the life cycle method of the corresponding actual component in the pushing SDK by the proxy component according to the life cycle event, so that the pushing SDK normally operates. The life cycle method of the operating system calling the proxy component is transmitted to the actual component in the pushing SDK, and the life cycle method is equal to the life cycle method of the actual component in the pushing SDK directly called by the operating system, so that the pushing SDK which is dynamically loaded can normally run.
A second receiving unit 34, configured to receive the service data from the second server through the push SDK.
The second receiving unit 34 receives and displays the service data sent by the second server side through the push SDK normally operated by the processing unit 33. The service data received and displayed by the second receiving unit 34 from the second server includes one of a notification bar message and a transparent transmission message.
When the second receiving unit 34 receives the service data from the second server by pushing the SDK, the following manner may be adopted: establishing a push channel with a second server end through the push SDK; and receiving the service data sent by the second server through the established push channel. The push channel established between the host application and the second server is a system-level push channel corresponding to the terminal device, and the host application can receive corresponding service data even when the host application is in a closed state.
When the second receiving unit 34 receives the transparent transmission message sent by the second server, the method further includes: and carrying out consistent processing on the appearance of the notification bar on the transparent transmission message, so that the push messages displayed in different manufacturer devices have consistent appearance of the notification bar. Therefore, the application developer does not need to adapt to the appearances of the notification bars for displaying the push messages of different manufacturer devices, and the push efficiency is improved.
Fig. 4 is a structural diagram of an apparatus for implementing push executed at a server according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes: a second transmitting unit 41 and a third transmitting unit 42.
The second sending unit 41 is configured to receive, by the first server, the attribute information of the terminal device sent by the host application, and send the push SDK to the host application after obtaining the corresponding push SDK according to the attribute information.
The first server side may store the corresponding relationship between the attribute information of each terminal device and the push SDK in advance, so that the second sending unit 41 can determine the push SDK corresponding to the received attribute information after receiving the attribute information of the terminal device sent by the host application through the pre-stored corresponding relationship, and further send the obtained push SDK to the host application.
And a third sending unit 42, configured to obtain service data by the second server and send the service data to the host application.
The host application developer publishes the service data at the second server, and the third sending unit 42 pushes the service data published by the host application developer to the host application.
When the host application developer issues the service data at the second server, the push channel may be selected in advance, that is, the second server pushes the service data to the host application on the terminal device of the specific manufacturer through the push channel selected by the host application developer. The host application developer may not select, and the second server automatically determines the push channel corresponding to the host application according to the attribute information of the terminal device where the host application is located, and then pushes the push message to the host application on the terminal device of the specific manufacturer through the determined push channel.
It can be understood that the first server side and the second server side may be the same server side or different server sides. If the server side is different, the first server side can send the attribute information of the terminal device where the host application is located to the second server side, so that the second server side can determine the corresponding push channel according to the attribute information of the terminal device conveniently. The attribute information of the terminal device can also be sent to the second server by the host application. It can be understood that the second server side stores in advance a corresponding relationship between the attribute information of each terminal device and each push channel.
In addition, if the service data issued by the host application developer at the second server is a notification bar message, the third sending unit 42 may further perform: and after the notification bar message issued by the host application developer is translated into the transparent message, the transparent message is sent to the host application through a push channel.
Fig. 5 illustrates a block diagram of an exemplary computer system/server 012 suitable for use in implementing embodiments of the invention. The computer system/server 012 shown in fig. 5 is only an example, and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.
As shown in fig. 5, the computer system/server 012 is embodied as a general purpose computing device. The components of computer system/server 012 may include, but are not limited to: one or more processors or processing units 016, a system memory 028, and a bus 018 that couples various system components including the system memory 028 and the processing unit 016.
Bus 018 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer system/server 012 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer system/server 012 and includes both volatile and nonvolatile media, removable and non-removable media.
System memory 028 can include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)030 and/or cache memory 032. The computer system/server 012 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 034 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In such cases, each drive may be connected to bus 018 via one or more data media interfaces. Memory 028 can include at least one program product having a set (e.g., at least one) of program modules configured to carry out the functions of embodiments of the present invention.
Program/utility 040 having a set (at least one) of program modules 042 can be stored, for example, in memory 028, such program modules 042 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof might include an implementation of a network environment. Program modules 042 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The computer system/server 012 may also communicate with one or more external devices 014 (e.g., keyboard, pointing device, display 024, etc.), hi the present invention, the computer system/server 012 communicates with an external radar device, and may also communicate with one or more devices that enable a user to interact with the computer system/server 012, and/or with any device (e.g., network card, modem, etc.) that enables the computer system/server 012 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 022. Also, the computer system/server 012 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the internet) via the network adapter 020. As shown, the network adapter 020 communicates with the other modules of the computer system/server 012 via bus 018. It should be appreciated that although not shown in fig. 5, other hardware and/or software modules may be used in conjunction with the computer system/server 012, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 016 executes programs stored in the system memory 028, thereby executing various functional applications and data processing, such as implementing the method flow provided by the embodiment of the present invention.
The computer program described above may be provided in a computer storage medium encoded with a computer program that, when executed by one or more computers, causes the one or more computers to perform the method flows and/or apparatus operations shown in the above-described embodiments of the invention. For example, the method flows provided by the embodiments of the invention are executed by one or more processors described above.
With the development of time and technology, the meaning of media is more and more extensive, and the propagation path of computer programs is not limited to tangible media any more, and can also be downloaded from a network directly and the like. Any combination of one or more computer-readable media may be employed. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
By utilizing the technical scheme provided by the invention, the host application dynamically acquires the push SDK, so that the integration of a plurality of push SDKs in the host application is avoided, and the purpose of reducing the increase of the push SDK to the size of the host application installation package is realized.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the units is only one logical functional division, and other divisions may be realized in practice.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (20)

1. A push implementation method is characterized in that the method comprises the following steps:
the host application sends the attribute information of the terminal equipment to the first server side;
receiving a pushed Software Development Kit (SDK) which is sent by the first server and corresponds to the attribute information of the terminal equipment;
loading and operating the push SDK through an agent component, wherein the agent component is a component with the same name provided by the host application for the component needing to be registered in the push SDK, and registering the agent component in advance;
and receiving service data from the second server side through the push SDK.
2. The method of claim 1, wherein the attribute information of the terminal device comprises: at least one of model information of the terminal device, manufacturer information of the terminal device, or identification code information of the terminal device.
3. The method of claim 1, further comprising:
and enabling the pushing SDK to normally operate through the proxy component.
4. The method of claim 3, wherein the enabling, by the proxy component, the push SDK to function normally comprises:
the host application acquires a life cycle event of the operating system calling agent component;
and calling a life cycle method of a corresponding actual component in the pushing SDK by the proxy component according to the life cycle event so that the pushing SDK normally operates.
5. The method of claim 1, wherein receiving service data from a second server via the push SDK comprises:
the host application establishes a push channel with the second server through the push SDK;
and receiving service data from the second server through the push channel.
6. The method of claim 5, wherein the service data comprises a pass-through message;
the method further comprises the following steps: and after the appearance of the notification bar of the transparent transmission message is subjected to consistency processing, displaying the transparent transmission message.
7. A push implementation method is characterized in that the method comprises the following steps:
the first server receives attribute information of the terminal equipment sent by a host application, and after acquiring a push SDK corresponding to the attribute information of the terminal equipment according to the attribute information of the terminal equipment, the first server sends the push SDK to the host application so that the host application is loaded and runs the push SDK through an agent component, and the agent component is a component with the same name provided by the host application for a component needing to be registered in the push SDK and registers the agent component in advance;
and the second server side acquires service data and sends the service data to the host application.
8. The method of claim 7, wherein the obtaining the push SDK corresponding to the attribute information of the terminal device comprises:
and the first server determines the push SDK corresponding to the received attribute information of the terminal equipment according to the pre-stored corresponding relation between the attribute information of the terminal equipment and the push SDK.
9. The method of claim 7, wherein sending the service data to the host application comprises:
the second server determines a push channel corresponding to the host application according to a pre-stored corresponding relationship between attribute information of the terminal device and the push channel;
and sending service data to the host application according to the determined push channel.
10. The method of claim 7, further comprising:
the second server end translates the acquired notification bar message into a transparent transmission message;
and sending the transparent transmission message obtained by translation to the host application through a push channel.
11. An apparatus for implementing push, the apparatus being located in a host application, comprising:
the first sending unit is used for sending the attribute information of the terminal equipment to the first server side;
the first receiving unit is used for receiving a pushed Software Development Kit (SDK) which is sent by the first server and corresponds to the attribute information of the terminal equipment;
the processing unit is used for loading and operating the push SDK through the proxy component, the proxy component is a component with the same name provided by the host application for the component needing to be registered in the push SDK, and the proxy component is registered in advance;
and the second receiving unit is used for receiving the service data from the second server through the push SDK.
12. The apparatus as claimed in claim 11, wherein said processing unit is further configured to perform:
and enabling the pushing SDK to normally operate through the proxy component.
13. The apparatus according to claim 12, wherein the processing unit, when enabling the push SDK to run normally through the proxy component, specifically performs:
acquiring a life cycle event of an operating system calling agent component;
and calling a life cycle method of a corresponding actual component in the pushing SDK by the proxy component according to the life cycle event so that the pushing SDK normally operates.
14. The apparatus of claim 12, wherein when the second receiving unit receives the service data from the second server via the push SDK, specifically performs:
establishing a push channel with the second server side through the push SDK;
and receiving service data from the second server through the push channel.
15. The apparatus of claim 14, wherein the service data comprises a pass-through message;
the second receiving unit is further configured to perform: and after the appearance of the notification bar of the transparent transmission message is subjected to consistency processing, displaying the transparent transmission message.
16. A push implementation device, wherein the device is located at a server side, and the device comprises:
the second sending unit is used for the first server side to receive attribute information of the terminal equipment sent by a host application, and after a push SDK corresponding to the attribute information of the terminal equipment is obtained according to the attribute information of the terminal equipment, the push SDK is sent to the host application so that the host application is loaded and runs the push SDK through a proxy component, the proxy component is a component with the same name, which is provided by the host application for a component needing to be registered in the push SDK, and the proxy component is registered in advance;
and the third sending unit is used for the second server side to obtain the service data and send the service data to the host application.
17. The apparatus of claim 16, wherein when the second sending unit obtains the push SDK corresponding to the attribute information of the terminal device, the second sending unit specifically performs:
and determining the push SDK corresponding to the received attribute information of the terminal equipment according to the corresponding relation between the attribute information of the terminal equipment and the push SDK which is stored in advance.
18. The apparatus according to claim 16, wherein when the third sending unit sends the service data to the host application, specifically:
determining a push channel corresponding to the host application according to a pre-stored corresponding relationship between attribute information of the terminal equipment and the push channel;
and sending service data to the host application according to the determined push channel.
19. An apparatus, characterized in that the apparatus comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
20. A storage medium containing computer-executable instructions for performing the method of any one of claims 1-10 when executed by a computer processor.
CN201810816598.XA 2018-07-24 2018-07-24 Push implementation method, device, equipment and computer storage medium Active CN109218393B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810816598.XA CN109218393B (en) 2018-07-24 2018-07-24 Push implementation method, device, equipment and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810816598.XA CN109218393B (en) 2018-07-24 2018-07-24 Push implementation method, device, equipment and computer storage medium

Publications (2)

Publication Number Publication Date
CN109218393A CN109218393A (en) 2019-01-15
CN109218393B true CN109218393B (en) 2021-09-21

Family

ID=64990208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810816598.XA Active CN109218393B (en) 2018-07-24 2018-07-24 Push implementation method, device, equipment and computer storage medium

Country Status (1)

Country Link
CN (1) CN109218393B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110839073A (en) * 2019-11-06 2020-02-25 北京小米智能科技有限公司 Method for acquiring push information, method and device for sending push information
CN111241443A (en) * 2020-01-08 2020-06-05 北京字节跳动网络技术有限公司 Method and device for pushing information and electronic equipment
CN112714161A (en) * 2020-12-22 2021-04-27 北京金山云网络技术有限公司 Video access method, device and system
CN113923107B (en) * 2021-10-14 2024-02-23 海南车智易通信息技术有限公司 Method, device, equipment and medium for automatically switching multiple channels of instant messaging

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830992A (en) * 2012-07-31 2012-12-19 北京奇虎科技有限公司 Plug-in loading method and system
CN103401896A (en) * 2013-07-15 2013-11-20 四川公用信息产业有限责任公司 Multi-Android-client service sharing method and system
CN103677877A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method and device for updating local advertisement software development kit
CN105141686A (en) * 2015-08-19 2015-12-09 贵阳朗玛信息技术股份有限公司 Method and device for achieving bluetooth communication
CN107133057A (en) * 2016-02-29 2017-09-05 上海指和信息科技有限公司 A kind of update of plug-in method applied to Android system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102830992A (en) * 2012-07-31 2012-12-19 北京奇虎科技有限公司 Plug-in loading method and system
CN103677877A (en) * 2012-09-12 2014-03-26 腾讯科技(深圳)有限公司 Method and device for updating local advertisement software development kit
CN103401896A (en) * 2013-07-15 2013-11-20 四川公用信息产业有限责任公司 Multi-Android-client service sharing method and system
CN105141686A (en) * 2015-08-19 2015-12-09 贵阳朗玛信息技术股份有限公司 Method and device for achieving bluetooth communication
CN107133057A (en) * 2016-02-29 2017-09-05 上海指和信息科技有限公司 A kind of update of plug-in method applied to Android system

Also Published As

Publication number Publication date
CN109218393A (en) 2019-01-15

Similar Documents

Publication Publication Date Title
CN109218393B (en) Push implementation method, device, equipment and computer storage medium
CN109213611B (en) Cross-process communication method, device, terminal and storage medium
CN110389936B (en) Method, equipment and computer storage medium for starting small program
CN110505162B (en) Message transmission method and device and electronic equipment
CN110389935B (en) Method, equipment and computer storage medium for starting small program
CN108762956B (en) Method for acquiring Native local data, server, mobile terminal and storage medium
CN110287146B (en) Method, device and computer storage medium for downloading application
CN107404418B (en) Internet product testing method, device, equipment and storage medium
CN109873735B (en) Performance test method and device for H5 page and computer equipment
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN113127050B (en) Application resource packaging process monitoring method, device, equipment and medium
CN109495549B (en) Method, equipment and computer storage medium for application pull alive
CN109150956B (en) Method, device and equipment for realizing SDK pushing and computer storage medium
CN109582317B (en) Method and apparatus for debugging hosted applications
CN112631924A (en) Automatic testing method and device, computer equipment and storage medium
CN112835632A (en) Method and device for calling end capability and computer storage medium
CN110990743B (en) Method and device for determining unloading rate of application program and electronic equipment
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN110489326B (en) IDS-based HTTPAPI debugging method device, medium and equipment
CN111124627B (en) Method and device for determining call initiator of application program, terminal and storage medium
CN111913861A (en) Performance test method, device, equipment and medium of Internet of things system
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN116028917A (en) Authority detection method and device, storage medium and electronic equipment
CN111741046B (en) Data reporting method, data acquisition method, device, equipment and medium
CN112379967B (en) Simulator detection method, device, equipment and medium

Legal Events

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