WO2021237433A1 - Message pushing method and apparatus, and electronic device and computer-readable medium - Google Patents
Message pushing method and apparatus, and electronic device and computer-readable medium Download PDFInfo
- Publication number
- WO2021237433A1 WO2021237433A1 PCT/CN2020/092206 CN2020092206W WO2021237433A1 WO 2021237433 A1 WO2021237433 A1 WO 2021237433A1 CN 2020092206 W CN2020092206 W CN 2020092206W WO 2021237433 A1 WO2021237433 A1 WO 2021237433A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- message
- designated
- push
- client
- pushed
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 80
- 101100512897 Caenorhabditis elegans mes-2 gene Proteins 0.000 description 28
- 101100097991 Schizosaccharomyces pombe (strain 972 / ATCC 24843) rar1 gene Proteins 0.000 description 28
- 101100512899 Caenorhabditis elegans mes-3 gene Proteins 0.000 description 26
- 101100512901 Caenorhabditis elegans mes-4 gene Proteins 0.000 description 25
- 101100512902 Drosophila melanogaster Mes-4 gene Proteins 0.000 description 25
- 238000007726 management method Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 13
- 239000008186 active pharmaceutical agent Substances 0.000 description 12
- 230000006870 function Effects 0.000 description 11
- 230000008569 process Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 11
- 238000004891 communication Methods 0.000 description 6
- 238000011161 development Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000012790 confirmation Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 230000007246 mechanism Effects 0.000 description 3
- 238000011084 recovery Methods 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 2
- 238000010168 coupling process Methods 0.000 description 2
- 238000005859 coupling reaction Methods 0.000 description 2
- 238000004880 explosion Methods 0.000 description 2
- 238000012423 maintenance Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 241000412611 Consul Species 0.000 description 1
- 101001094649 Homo sapiens Popeye domain-containing protein 3 Proteins 0.000 description 1
- 101000608234 Homo sapiens Pyrin domain-containing protein 5 Proteins 0.000 description 1
- 101000578693 Homo sapiens Target of rapamycin complex subunit LST8 Proteins 0.000 description 1
- 102100027802 Target of rapamycin complex subunit LST8 Human genes 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- -1 mes5] Proteins 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000011144 upstream manufacturing Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
Definitions
- This application relates to the push field, and more specifically, to a message push method, device, electronic device, and computer-readable medium.
- the structure of the message push depends on a third-party architecture like zookeeper, and the structure is too complicated.
- This application proposes a message push method, device, electronic equipment, and computer readable medium to improve the above-mentioned drawbacks.
- an embodiment of the present application provides a message push method, which is applied to a server of a push system, the push system further includes at least one client, and the method includes: obtaining a message push request, the message push request It includes a designated client identifier; a designated connector is determined based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is the SDK component corresponding to the designated client; The designated connector sends the message to be pushed to the designated SDK component, so that the designated SDK component sends the message to be pushed to the designated client.
- the embodiments of the present application also provide a message pushing device, which is applied to the server of the pushing system, the pushing system further includes at least one client, and the message pushing device includes: an acquiring unit, a determining unit, and a sending unit. unit.
- the obtaining unit is configured to obtain a message push request, where the message push request includes a designated client identifier.
- the determining unit is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client.
- the sending unit is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more application programs are configured to execute the foregoing method.
- an embodiment of the present application also provides a computer-readable medium, the readable storage medium stores program code executable by a processor, and when the program code is executed by the processor, the processor Perform the above method.
- the message push method, device, electronic equipment, and computer-readable medium provided in this application obtain the message push request corresponding to the designated client identifier, and determine the designated connector based on the designated client identifier, and the designated client passes the designated client’s designation
- the SDK component is connected to the designated connector, and then the server sends the message to be pushed to the designated SDK component through the designated connector, and the designated SDK component sends the message to be pushed to the designated client. Therefore, the push of messages can be realized through the connector and SDK components, and the push structure is simple.
- FIG. 1 shows a schematic diagram of an application scenario of a message push method according to an embodiment of the present application
- Figure 2 shows a schematic diagram of a message push architecture provided by an embodiment of the present application
- FIG. 3 shows a method flowchart of a message pushing method provided by an embodiment of the present application
- FIG. 4 shows a method flowchart of a message pushing method provided by another embodiment of the present application.
- FIG. 5 shows a schematic diagram of a message push architecture provided by another embodiment of the present application.
- FIG. 6 shows a schematic diagram of a message cross-region notification provided by the present application
- FIG. 7 shows a method flowchart of a message pushing method provided by another embodiment of the present application.
- FIG. 8 shows a method flowchart of a message pushing method provided by still another embodiment of the present application.
- FIG. 9 shows a block diagram of a message pushing device provided by an embodiment of the present application.
- FIG. 10 shows a block diagram of a module of a message pushing device provided by another embodiment of the present application.
- FIG. 11 shows a schematic diagram of an electronic device provided by an embodiment of the present application.
- FIG. 12 is a storage unit for storing or carrying program code for implementing the message pushing method according to the embodiment of the present application according to an embodiment of the present application.
- FIG. 1 shows a schematic diagram of an application scenario of a message push method according to an embodiment of the present application.
- a user terminal 10 and a server 20 are located in a wireless network or a wired network, and the user terminal 10 and the server 20 Perform data interaction.
- the client is installed in the user terminal 10, for example, it may be an application program installed in the user terminal 10.
- the user logs in through an account at the client, and all information corresponding to the account can be stored in the storage space of the server 20.
- the server 20 may be a separate server, or a server cluster, and may be a local server or a cloud server.
- the user can use the user terminal 10 to interact with the server 20 through the network to receive or send messages and so on.
- Various communication client applications such as web browser applications, instant messaging tools, social platform software, etc., may be installed on the user terminal 10.
- the user terminal 10 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and so on.
- the server 20 may be a server that provides various services, for example, a server that provides support for a live video website browsed by the user using the user terminal 10.
- the server 20 can process messages generated by the user using the user terminal 10.
- the server 20 can, for example, receive target messages generated by the user using the user terminal 10.
- the server 20 can process the received push information and other data.
- the server 20 can also process The push information is forwarded to other user terminals 10.
- the server 20 may be a physical server, or may be, for example, a cluster composed of multiple servers.
- a part of the server 20 may be, for example, a target message receiving server in the present application for receiving target messages generated by users using the user terminal 10;
- a part of the server 20 may also be used as a push server in the present application, for example, for pushing the target message to the message receiving end in the receiving group through the push server corresponding to the receiving group.
- Figure 2 shows a message push architecture
- the registration authentication module is also deployed in a cluster, and is loaded through the front-end proxy service (Nginx). Its main purpose is to do authentication and return a token to the client.
- Nginx is a high-performance HTTP and reverse proxy web server, and also provides IMAP/POP3/SMTP services.
- the platform in Figure 2 can refer to the management platform, which can view the current real-time online number, push messages to designated clients, and so on. Push messages need to go through a push-server to find the real push node.
- ZooKeeper is a distributed, open source distributed application coordination service, an open source implementation of Google’s Chubby, and an important component of Hadoop and Hbase. It is a software that provides consistent services for distributed applications. The functions provided include: configuration maintenance, domain name services, distributed synchronization, group services, etc.
- the registration authentication module will subscribe to the nodes in Zookeeper, so that you can get the latest service list.
- Zookeeper The core of Zookeeper is atomic broadcasting. This mechanism ensures synchronization between various service processes (Server).
- the protocol that implements this mechanism is called the consensus protocol (Zab protocol).
- the Zab protocol has two modes, which are recovery mode (primary selection) and broadcast mode (synchronization). When the service starts or after the leader crashes, Zab enters the recovery mode. When the leader is elected and most of the servers are synchronized with the state of the main process (leader), the recovery mode ends. State synchronization ensures that the leader and server have the same system state.
- zookeeper uses an increasing transaction id number (zxid) to identify the transaction. All proposals are added with zxid when they are made.
- zxid is a 64-bit number, and its high 32-bit is the period number (epoch) used to identify whether the leader relationship has changed. Every time a leader is selected, it will have a new epoch that identifies the current leader. The period of reign. The lower 32 bits are used to count up.
- the preset standard may include: try to ensure that the connection of each node is balanced, and whether to add or delete nodes to be balanced.
- Redis ie, routing storage
- the unique identifier of the current client and the ip+port of the service node need to be stored in Redis. At the same time, this connection must be deleted in Redis when the client is offline.
- Kafka is a message consumption mechanism, specifically, it can include broadcast consumption and single consumption.
- broadcast consumption is to identify the messages that belong to the broadcast by defining topic prefixes, such as topicname: gonggao1535680698557.
- topicname such as topicname: gonggao1535680698557.
- groupid different roles and different user IDs (userid) represent the corresponding user group IDs.
- single consumption by defining a topic prefixed by topic as a person (person). For example, person1time1536031022097, where the number between person and time is the current user, and the corresponding groupid is fixed when the message is consumed.
- Kafka cannot broadcast consumption and can only correspond to a certain user consumption.
- the inventor found in his research that the existing push architecture has a complicated structure.
- third-party middleware such as Kafka, redis, and zookeeper need to be used, and at the same time, it cannot support the expansion of the computer room to send messages.
- an embodiment of the present application provides a message push method, which is applied to a push system, wherein the push system includes a server and at least one client.
- the push system may be the one shown in FIG. 1
- the server can be the above-mentioned server.
- the execution subject of the method may be the server.
- the method includes: S301 to S303.
- the message push request includes a designated client identifier. Then the message push request is used to request to send the specified message content to the specified client.
- the message push request further includes a message identifier, and the message identifier is used to request to send a message corresponding to the message identifier to a designated client, that is, the message corresponding to the message identifier is used as a message to be pushed.
- the content pushed by the server for each client is consistent, that is, the content to be pushed is pre-stored, and the content to be pushed accepted by each client The content is the same, and the message push request is used to trigger the pre-obtained content to be pushed to be sent to the designated client.
- S302 Determine a designated connector based on the designated client identifier.
- the designated connector is connected to a designated SDK component, where the designated SDK component is an SDK component corresponding to the designated client.
- the connector can be a port of the server.
- the port can be a physical port or a data port.
- the data port is used to package data in a certain format and send the packaged data to the The client or other module connected to this port.
- the connector can be an API interface.
- a connector correspondence table is stored in the server, and the connector correspondence table is used to record the client identifier corresponding to each connector.
- each connected machine corresponds to a connected machine ID
- the connector correspondence table can be recorded through the corresponding relationship between the connector ID and the client ID.
- the connector correspondence table can determine the connector identifier corresponding to the designated client identifier in the message push request, and then determine the designated connector corresponding to the designated client identifier.
- the designated client corresponds to an SDK component
- the SDK component for the designated client is named the designated SDK component
- SDK Software Development Kit
- the server can connect to the client through the integrated access interface.
- each client corresponds to at least one SDK component.
- the communication protocol between the server and the client is integrated, and the SDK component is used to implement data interaction and communication between the server and the client.
- each connector can be connected to at least one SDK component.
- a connector management record is set in the server, and each connector corresponds to a connector management record, and the connection management record includes the connector The ID of each SDK component connected. Therefore, after determining the designated connector corresponding to the designated client identifier according to the message push request, the SDK component connected to the designated connector is determined, and the SDK component corresponding to the designated client identifier is searched for as the designated SDK component.
- S303 Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- the server sends the message to be pushed to the designated SDK component through the designated connector, so that the designated client can obtain the message to be pushed through the designated SDK component.
- the designated SDK component is integrated in the designated client, and the designated client is installed in the user terminal, and the user terminal includes a storage space for storing the data of the designated client.
- the designated SDK component can The message to be pushed is stored in the storage space corresponding to the designated client, and the designated client is notified that the message to be pushed has been stored in the storage space corresponding to the designated client, and the designated client can obtain the to-be pushed through the storage space information.
- the designated SDK component can also be installed in a user terminal.
- the user terminal is a terminal with a designated client installed, and the SDK component and the designated client are two independent programs, and the SDK component is used as the designated The channel between the client and the designated connector is used to send the message to be pushed to the designated client.
- the server sends the message to be pushed to the designated SDK component through the designated connector, and the designated SDK component sends the message to be pushed to the designated client. Therefore, the push of messages can be realized through the connector and SDK components, and the push structure is simple.
- Figure 4 shows a message push method, which is applied to a push system, where the push system includes a server and at least one client.
- the push system may be the system shown in Figure 1
- the server can be the above-mentioned server.
- the execution subject of the method may be the server.
- the method includes: S401 to S403.
- the server includes a push module and a database module.
- the push module is used to initiate a request to push messages to the client, that is, the push module can act as a decision maker for message push, and is used to determine a push strategy for pushing messages to the client.
- the push module includes a service intelligence component, a configuration center, and a registration center.
- the registration center may be used to implement registration and subscription operations for each server or computer room or client.
- the registration center is dynamic data. These data do not exist in the development situation. They are generated and changed through the start and stop of some instances. For example, a new node is added to the system, or a new client is subscribed to all service changes, and all online instances can be found through a certain service.
- it can be implemented through technologies such as zookeeper, etc, nacos, etcd, redis, consul, and eruka.
- the configuration center can perform parameter configuration for each node in the distributed system. Specifically, it can be manual configuration and automated deployment based on Jenkins or Ansible.
- the manual configuration method is that the configuration personnel manually modify the configuration parameters of each server and manually start the process of each server for realizing the specified service or completing the specified task.
- the configuration file may be pushed for each node, that is, the pushed message is the configuration file of each node.
- the node device obtains the configuration file, it can configure the specified parameters for running the specified program according to the configuration file.
- the designated parameter may include application-related parameters.
- the specified parameters may include service request timeout, thread pool and queue size, cache expiration time, database connection pool capacity, log output level, current limit fuse threshold, service security black and white list, etc.
- the specified parameters may also include configuration parameters of the operating environment, for example, connection string configuration of databases, middleware, and other services.
- the specified parameters may also include security configuration parameters, for example, user name, password, access token, license certificate, etc.
- an implementation manner for the server to obtain the message push request may be that the push module sends the message push request to the database module, so that the database module obtains the message push request sent by the push module.
- the server further includes an interface module.
- the above-mentioned interface module and connector all belong to a database module.
- the database module includes an interface module, a connector, and a database management system.
- the interface module is used to realize the connection between the push module and the database management system, specifically, to realize the read and write operations on the database.
- the database management system is used to manage the database.
- the push module may be an application message push component, that is, the push module may be an application with an application message push function, and the server is integrated with an application message push component, so that the server has an application message Push function, where the application message push component can be a component for the server to push client messages for the user terminal.
- the application message push component may be an APP PUSH component
- the push module may be an application system using APP PUSH
- the APP PUSH component may be an application system using APP PUSH.
- the application system generally consists of a computer hardware system, system software, and application software.
- the basic computer hardware system is composed of arithmetic unit and controller, memory, peripheral interface and peripheral equipment rights.
- System software includes operating system, compiler, database management system, various high-level languages, etc.
- the application software consists of general support software and various application software packages. Then the application software can be software that can use the APP PUSH function.
- APP PUSH refers to the active push of messages to users' mobile devices by operators through their own products or third-party tools. Users can see push message notifications on the lock screen and notification bar of their mobile devices. Tap on the notification bar to wake up the APP and go to the corresponding page.
- the interface module is used as an APP PUSH interface, which defines the data transmission format between the push module and the database module.
- communication between different servers can also pass through the interface module.
- the message to be sent to the client is input to the interface module in the form of a message queue, and the interface module is written into the database management system to store the content of the message in the database.
- the database management system may be a relational database management system (MYSQL), and the connector may be a Connector.
- MySQL Connector is an interface for MySQL database client programming, which provides access to the database through the network. interface.
- the method for obtaining the message push request sent by the push module may be that the interface module obtains the message push request sent by the push module; the interface module writes the message push request into the
- the database module that is, the interface module provides an interface for the push module to access the database.
- the interface may be an API interface at the application layer.
- the interface module may be HTTP API, that is, data is transmitted between the push module and the interface module based on the HTTP protocol.
- S402 Determine a designated connector based on the designated client identifier.
- S403 Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- the interface module writes the message push request into the database module, and the message push request includes a designated client identifier, and the database module establishes a connection with the designated client identifier based on the message push request.
- the message push task may include a designated client identifier.
- the interface module writes the message push request to the database management system.
- the message push task also includes the identification of the message to be pushed.
- the database management system determines the specified connector based on the identification of the specified client, and sends the message to be pushed.
- the identifier of is sent to the designated connector, and the designated connector obtains the message to be pushed corresponding to the identifier of the message to be pushed from the database according to the identifier of the message to be pushed, and sends the message to be pushed to the designated SDK component.
- the database module includes a plurality of connectors, and each connector periodically reads the message push task in the database management system, and can identify each message push task according to the designated client identifier in the message push task. The corresponding connector then obtains the message push task corresponding to itself, and determines the message to be pushed according to the message push task.
- the message push task established by the database management system may also include the identifier of the designated connector and the identifier of the message to be pushed.
- Each connector can scan all message push tasks and identify the message push task. The identifier of the connector within, so that the specified connector can scan the message push task containing the identifier of the specified connector, so that the message push task can be obtained and the message to be pushed can be determined.
- the designated connector obtains the message push task from the database module based on a preset time period. Specifically, it may be that the designated connector scans all message push tasks based on a preset time period, and finds the message push task corresponding to the designated connector. It may also be that the database management system issues a message push task to the designated connector according to a preset time period. Wherein, the preset time period can be set according to user requirements, for example, it can be 1 second.
- an application system that uses App Push (for example: a registry) only needs to send a message delivery request to the HTTP API of the server of the App Push system, that is, send a message push request.
- the HTTP API writes the sent message push task to MySQL.
- the designated connector After a preset time period (after 1 second at the latest), the designated connector obtains the client's task message list from MySQL. At the same time, a message is sent to the client.
- the designated connector is the connector that establishes a connection with the designated client (the client that accesses the App Push SDK).
- the interface module obtains a synchronization request sent by another server, and the synchronization request includes the description content of a specified message; if the description content of the specified message is consistent with the description content of the message to be pushed, the interface The module sends the message to be pushed to the interface module of the other server.
- the description content may be a description of the content of the message, for example, it may be a summary of the message as an introduction to the content of the message.
- each message corresponds to a summary
- the description content may be a summary of the message
- the description content may include an introduction to the content of the message
- the client information to be pushed and the client information may include the client At least one of the identification and type of the terminal.
- the client information may include the client identifier
- the synchronization request sent by the other server includes the identifier of the client to be pushed
- the interface module includes multiple message push requests sent by the push module, and Each message push request includes the identification of the client.
- the interface module can set a message queue, and the message queue includes multiple message push requests, then the interface module obtains synchronization requests sent by other servers, parses the synchronization requests to obtain client information, and finds information related to the The message push request that matches the client information, the matched message push request is used as the designated message push request, and the message content corresponding to the designated message push request is sent to the other server to achieve message synchronization and cross-region message notification .
- other servers can push the synchronized message to the corresponding client.
- Figure 6 shows two computer rooms, namely the central computer room and the A computer room.
- Each computer room includes the aforementioned server and a client corresponding to each server.
- the HTTP API of the computer room A sends a synchronization request to the HTTP API of the central computer room.
- message notifications across computer rooms can be realized. That is to say, the HTTP API of different computer rooms will continue to obtain the local computer room from the HTTP API of the central computer room. Required notification message.
- the message push system for implementing the message push method provided by the embodiment of the present application has low landing difficulty, simple upgrade and maintenance, and simple extension.
- the number of Connector connections can support more than one million client connections.
- multiple Connectors and HTTP APIs can be added to decentralize client or server connections.
- the supporting App push SDK is easy to use.
- the configuration center and the registration center can be easily accessed, and the same channel can be reused in the same SDK. And it solves the problem of resource consumption caused by different channels in different systems.
- the execution of sending the message to be pushed to the specified SDK component it can also detect whether the message is successfully sent to the client, and then, based on the detection result, if the message is not sent successfully, it is sent again.
- FIG. 7 shows a message push method applied to a push system.
- the push system includes a server and at least one client.
- the push system may be the one shown in FIG.
- the server can be the above-mentioned server.
- the execution subject of the method may be the server.
- the method includes: S701 to S705.
- S702 Determine a designated connector based on the designated client identifier.
- S703 Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- the message push result of the designated client may be detected according to the information replies from the designated client, or the message push result of the designated client may be detected according to the message push record of the designated client described above.
- the implementation manner of detecting the message push result of the designated client may be to detect whether the indication information of the synchronous successful reception message fed back by the designated client is received; if it is successfully received, it is determined that the message push result is The message is successfully received; if it is not successfully received, it is determined that the message push result is an unsuccessful message reception.
- the message push result includes two results, which are successfully received messages and unsuccessfully received messages.
- the successful reception of the message indicates that the client has successfully received the message pushed by the server
- the unsuccessful reception of the message indicates that the client has not successfully received the message pushed by the server.
- the indication information of the synchronously successfully received message fed back by the client can be a text message, voice, picture, or video format information, or a parameter value used to indicate that the message pushed by the server has been successfully received.
- the time starting point of the preset time period may be the time point at which the operation of sending the message to be pushed to the specified SDK component based on the specified connector is performed, and the predetermined time length of the predetermined time period may be predetermined, for example, , Can be set based on experience.
- the designated client after the execution of sending the message to be pushed to the designated SDK component based on the designated connector, it will wait for the designated client to feed back the indication information that the synchronization has successfully received the message, that is, it is determined that it is within the preset time period. Whether to receive the indication information of the synchronization successful reception message fed back by the specified client.
- a confirmation request is sent to the designated client, and the confirmation request is used to instruct the designated client to feed back the designated SDK component. information.
- the time point at which the confirmation request is sent may be taken as the time starting point of the preset time period, and then it is determined whether the specified information fed back by the specified client based on the confirmation request is received within the preset time period.
- the message pushed by the server to the client is recorded and the message identifier is set.
- the message identifier corresponding to the message determined by the server to be pushed to the specified client is named the first message Logo. After the client obtains the message pushed by the server, it will feed back the identifier of the pushed message to the server, so that the server can determine the client based on the identifier of the message fed back by the client and the identifier of the message pushed to the client Whether the terminal successfully receives the message to be pushed.
- the implementation manner of detecting the message push result of the designated client may be to obtain the first message identifier corresponding to the message sent by the server to the designated client; and to obtain the second message fed back by the designated client
- An identifier the second message identifier is a first message identifier corresponding to a message successfully received by the designated client; the message push result of the designated client is determined according to the first message identifier and the second message identifier.
- the server sends at least one message to the designated client, and each message corresponds to a first message identifier. Then, the client records the first message identifier of all successfully received messages as the first message identifier. 2. Message identification. For example, the server sends 5 messages to the designated client, and the first message identifiers of the 5 messages are respectively marked as mes1, mes2, mes3, mes4, and mes5, and the messages successfully received by the client are mes2, mes3, and mes4. The client then marks mes2, mes3, and mes4 as the second message identifiers, and returns the second message identifiers to the server.
- the server determines whether the second message identifier matches the first message identifier, and if it matches, it determines that the message push result is a successfully received message; if it does not match, it determines that the message push result is an unsuccessful message received.
- the second message identifiers are mes2, mes3, and mes4. By matching the first message identifier and the second message identifier, the service can determine that mes2, mes3, and mes4 are successfully received by the client, but mes1 and mes5 It was not successfully received.
- the implementation manner for determining whether the first message identifier and the second message identifier match may be determining whether the first message identifier and the second message identifier are the same, for example, the first message identifier is mes1 , The second message identifier is mes1, which means that the first message identifier matches the second message identifier. If the first message identifier is mes1 and the second message identifier is mes2, it means that the first message identifier and the second message identifier do not match, which may indicate that the client has not successfully obtained the message corresponding to mes1, for example, the received message Mes2 may be sent by another server.
- the message to be pushed is sent to the designated client again.
- the operation of detecting the message push result of the designated client is performed again afterwards, until the message to be pushed is successfully sent to the designated client.
- the number of retransmissions may be limited.
- the implementation manner of S705 may be that the message to be pushed is sent to the designated client again, and the number of transmissions is counted. If the number of times is greater than a designated value, Then stop performing the operation of sending the message to be pushed to the designated client again.
- the specified value can be set according to needs,
- the message push result of the designated client is detected; if the message push result is that the message is not successfully received, the server will record the message push result.
- the number of times the message to be pushed is sent to the designated SDK component, and it is determined whether the number is greater than a designated value, and if it is less than or equal to, the message to be pushed is sent to the designated client again, and the number is updated, At the same time, it returns to execute the step of detecting the message push result of the designated client and subsequent operations.
- FIG. 8 shows a message push method applied to a push system.
- the push system includes a server and at least one client.
- the push system may be the one shown in FIG.
- the server can be the above-mentioned server.
- the execution subject of the method may be the server.
- the method includes: S801 to S804.
- S802 Determine a designated connector based on the designated client identifier.
- S803 Determine the message sending queues corresponding to the multiple messages to be pushed according to the preset sending order.
- the server can set a message sending queue for the multiple messages to be pushed. For example, if there are 5 messages to be pushed, and the first message identifiers corresponding to the 5 messages to be pushed are mes1, mes2, mes3, mes4, and mes5 respectively, the determined message sending queue is [mes1, mes2, mes3, mes4, mes5].
- S804 Send the multiple messages to be pushed to the designated SDK component in sequence based on the designated connector and according to the message sending queue.
- the message sending queue corresponds to a sequence number
- the sequence number corresponding to mes1 is sequence number 1
- the sequence number corresponding to mes2 is sequence number 2
- the sequence number corresponding to mes3 is sequence number 3
- the sequence number corresponding to mes4 is sequence number 4
- the sequence number corresponding to mes5 is The sequence number is sequence number 5.
- the server sends multiple messages to be pushed to the client in sequence according to the sequence numbers of each message in the message sending queue.
- the server sends each message to be pushed to the client according to the message sending list.
- a serial number may be set on the client, and the serial number is updated every time a message is successfully received.
- the serial number of each message in the message sending queue is recorded as the first serial number, and the serial number of the successfully received message recorded by the client's statistics is recorded as the second serial number.
- the first sequence number is seq1 and the initial value is 0, after the message is sent for the first time, the value of the first sequence number seq1 becomes 1, and after the message is sent for the second time, the first sequence number The value of the sequence number seq1 becomes 2, and so on, if there are multiple messages to be pushed, these are mes1, mes2, mes3, mes4, and mes5.
- the corresponding relationship between the first message identifier and the value of the sequence number seq1 is: mes1
- the sequence numbers seq1 corresponding to mes2, mes3, mes4, and mes5 are 1, 2, 3, 4, and 5 in order.
- the initial value is 0.
- the value of the second sequence number seq2 becomes 1
- the second designated client successfully receives the message
- the value of the second sequence number seq2 becomes 2 and so on, if the designated client successfully receives multiple messages, namely mes1, mes2, mes3, mes4, and mes5, the sequence number seq2 is 1, in turn 2, 3, 4, and 5.
- the size relationship between the first sequence number and the second sequence number is acquired; if the size relationship meets a specified condition, it is determined that the message to be pushed is successfully sent to the specified client; otherwise, it is determined The message to be pushed is not successfully sent to the designated client.
- the size relationship may be whether the first serial number is less than or equal to the second serial number, or another size relationship that can characterize whether the first serial number is less than or equal to the second serial number, for example, it may also be the acquisition of the first serial number.
- the ratio between the serial number and the second serial number If the ratio is greater than 1, it indicates that the first serial number is greater than the second serial number. If the ratio is not greater than 1, it indicates that the first serial number is less than or equal to the second serial number. No.
- the first sequence number is less than or equal to the second sequence number, it means that the message to be pushed is successfully sent to the designated client.
- the first sequence number of mes2 is 2, which means that 2 messages are currently sent, that is, the first sequence number of mes1 is 1.
- the second sequence number is 2, it means that two messages have been successfully received, and it can be determined Successfully received mes2.
- the designated connector sequentially sends a plurality of the messages to be pushed to the designated SDK component according to the message sending queue, it is determined that the messages to be pushed are not successfully sent to the designated client, As a failure message; sending the failure message to the designated SDK component.
- each of the messages to be pushed corresponds to the first message identifier
- a plurality of the first message identifiers correspond to the sequence numbers in the message sending queue in a one-to-one correspondence, that is, the aforementioned mes1 to mes5, and mes1 correspond to
- the serial number is serial number 1
- the serial number corresponding to mes2 is serial number 2
- the serial number corresponding to mes3 is serial number 3
- the serial number corresponding to mes4 is serial number 4
- the serial number corresponding to mes5 is serial number 5.
- the second message identifier is the first message identifier corresponding to the message successfully received recently by the designated client.
- the second message identifier may be a first message identifier corresponding to all messages successfully received by the designated client. For example, if it is specified that the messages successfully received by the client are mes1 and mes2, the second message identifiers are mes1 and mes2.
- the second information identifier may be a first message identifier corresponding to a part of the message received by the client.
- the client sends the second message identifier to the server, and the server uses the plurality of first message identifiers to search for the first message identifier that is the same as the second message identifier, as the designated message identifier; Look up the sequence number corresponding to the specified message identifier in the queue as the target sequence number; use the message to be pushed after the target sequence number in the message sending queue as a failure message, and send the failure message to the specified SDK component .
- the server sends mes1, mes2, mes3, mes4, mes5 to the specified client in turn, and then obtains the second message identifier returned by the specified client as mes1 And mes2, it indicates that mes3, mes4, and mes5 were not successfully sent.
- the second message identifier is matched with the first message identifier in the message sending queue, and the determined designated message identifiers are mes1 and mes2, and the determined target sequence number is sequence number 2, so that sequence numbers 3 and 3 after sequence number 2 are combined.
- Mes3, mes4, and mes5 corresponding to 4 and 5 are regarded as failure messages.
- a plurality of the first message identifiers are sequentially increased according to the sequence number of the message sending queue, and the second message identifier is the largest first message identifier among all the messages successfully received by the designated client .
- connection between the server and the designated client may be disconnected due to a sudden disconnection of the connection or congestion of the line, so that some data cannot be successfully sent to the designated client. Therefore, the message that was not successfully sent to the specified client can be resent. Because, resending can re-establish the connection between the specified client and the server.
- sequence numbers of the message sending queues increase sequentially, and as the sequence numbers gradually increase, the message identifiers also gradually increase.
- the aforementioned message sending queue [mes1, mes2, mes3, mes4, mes5], mes1, mes2
- the first message identifiers of, mes3, mes4, and mes5 increase in turn, that is, mes1 is the smallest and mes5 is the largest.
- the largest first message identifier in the messages successfully received by the client is designated as the second message identifier, for example, specify
- the messages successfully received by the client are mes1, mes2, and mes3, and the second message identifier is mes3.
- the designated client sends the second message identifier to the server, and the server can determine that in the message sending queue, the message after the first message identifier that is the same as the second message identifier is not successfully sent, that is [mes1, mes2, mes3,
- the messages after mes3 in mes4, mes5], that is, mes4 and mes5 are failure messages.
- the message before mes3 is successfully sent to the designated client, and the message after mes3 is due to the server and the designated client.
- the connection between the terminals is faulty and cannot be sent successfully. Therefore, after the failure message is determined, for example, after it is determined that mes4 and mes5 have not been successfully sent, mes4 and mes5 are sent to the designated client again, so that by sending the connection between the established server and the designated client again, there can be more High probability to restore the connection between the two, even if the two can successfully connect, and successfully send mes4 and mes5 to the designated client.
- the re-weighting of messages is performed, so that all messages to be pushed are more likely to be successfully sent to the specified client.
- FIG. 9 shows a structural block diagram of a message push device 900 provided by an embodiment of the present application.
- the device is applied to the server of a push system.
- the push system further includes at least one client.
- the The message pushing device 900 may include: an acquiring unit 901, a determining unit 902, and a sending unit 903.
- the obtaining unit 901 is configured to obtain a message push request, where the message push request includes a designated client identifier.
- the determining unit 902 is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, where the designated SDK component is an SDK component corresponding to the designated client.
- the sending unit 903 is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- FIG. 10 shows a structural block diagram of a message pushing device 1000 provided by an embodiment of the present application.
- the device is applied to the server of a pushing system.
- the pushing system further includes at least one client.
- the message pushing device 1000 may include: an acquiring unit 1001, a determining unit 1002, a sending unit 1003, and a detecting unit 1004.
- the obtaining unit 1001 is configured to obtain a message push request, where the message push request includes a designated client identifier.
- the server includes a push module and a database module
- the obtaining unit 1001 is further configured to obtain the message push request sent by the push module.
- the server further includes an interface module
- the acquiring unit 1001 is also configured to trigger the interface module to acquire the message push request sent by the push module, and trigger the interface module to write the message push request into the Database module.
- the acquiring unit 1001 is also configured to trigger: the database module establishes a message push task corresponding to the designated client identifier based on the message push request; the designated connector acquires the message from the database module A push task, which sends the message to be pushed to the designated SDK component based on the message push task.
- the acquiring unit 1001 is further configured to trigger: the designated connector acquires the message push task from the database module based on a preset time period.
- the push module is a client terminal that uses the application message push component.
- the application message pushing component is an APP PUSH component.
- the interface module is HTTP API.
- the acquiring unit 1001 is also configured to trigger the interface module to acquire a synchronization request sent by another server, the synchronization request includes the description content of the specified message; if the description content of the specified message is the same as the description of the message to be pushed If the content is consistent, the interface module sends the message to be pushed to the interface module of the other server.
- the determining unit 1002 is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client.
- the sending unit 1003 is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- the sending unit 1003 is further configured to determine the message sending queues corresponding to the multiple messages to be pushed according to a preset sending order; and send the multiple messages to be pushed in sequence according to the message sending queue based on the designated connector To the specified SDK component.
- the sending unit 1003 is further configured to determine a message to be pushed that is not successfully sent to the designated client as a failure message; and send the failure message to the designated SDK component.
- each of the messages to be pushed corresponds to the first message identifier, and a plurality of the first message identifiers correspond to the sequence numbers in the message sending queue in a one-to-one correspondence, and the second message identifier is the Specify the first message identifier corresponding to the message successfully received by the client recently, and the sending unit 1003 is further configured to search for a first message identifier that is the same as the second message identifier from a plurality of the first message identifiers as the designated message identifier; The sequence number corresponding to the specified message identifier is searched in the message sending queue as the target sequence number; the message to be pushed after the target sequence number in the message sending queue is regarded as the failure message.
- the plurality of first message identifiers increase sequentially according to the sequence number of the message sending queue, and the second message identifier is the largest first message identifier among all the messages successfully received by the designated client.
- the detection unit 1004 is configured to detect the message push result of the designated client; if the message push result is that the message is not successfully received, the message to be pushed is sent to the designated client again.
- the detection unit 1004 is also used to detect whether the indication information of the synchronization successful reception message fed back by the designated client is received; if it is successfully received, it is determined that the message push result is a successful reception message; if it is not successfully received , It is determined that the message push result is that the message is not successfully received.
- the detection unit 1004 is further configured to obtain the first message identifier corresponding to the message sent by the server to the designated client; and obtain the second message identifier fed back by the designated client, where the second message identifier is The first message identifier corresponding to the message successfully received by the designated client; and the message push result of the designated client is determined according to the first message identifier and the second message identifier.
- the detection unit 1004 is also used to determine whether the first message identifier and the second message identifier match; if they match, determine that the message push result is a successful reception of the message; if they do not match, determine the message The push result is that the message was not successfully received.
- the coupling between the modules may be electrical, mechanical or other forms of coupling.
- each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
- the electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book.
- the electronic device 100 in this application may be the aforementioned server.
- the electronic device 100 may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be operated by one Or multiple processors 110 execute, and one or more programs are configured to execute the method described in the foregoing method embodiment.
- the processor 110 may include one or more processing cores.
- the processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120.
- Various functions and processing data of the electronic device 100 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA).
- DSP Digital Signal Processing
- FPGA Field-Programmable Gate Array
- PLA Programmable Logic Array
- the processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem.
- CPU Central Processing Unit
- GPU Graphics Processing Unit
- modem modem
- the CPU mainly processes the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
- the memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory).
- the memory 120 may be used to store instructions, programs, codes, code sets or instruction sets.
- the memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following various method embodiments, etc.
- the storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
- FIG. 12 shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application.
- the computer-readable medium 1200 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
- the computer-readable storage medium 1200 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM.
- the computer-readable storage medium 1200 includes a non-transitory computer-readable storage medium.
- the computer-readable storage medium 1200 has storage space for the program code 1210 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products.
- the program code 1210 may be compressed in a suitable form, for example.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The present application relates to the field of pushing, and disclosed are a message pushing method and apparatus, and an electronic device and a computer-readable medium. The method comprises: obtaining a message pushing request, the message pushing request comprising a specified client identifier; determining a specified connector on the basis of the specified client identifier, the specified connector being connected to a specified SDK assembly, wherein the specified SDK assembly is an SDK assembly corresponding to a specified client; and sending, to the specified SDK assembly on the basis of the specified connector, a message to be pushed, so that the specified SDK assembly sends said message to the specified client. A server sends said message to the specified SDK assembly by means of the specified connector, and the specified SDK assembly sends said message to the specified client. Therefore, message pushing can be achieved by means of a connector and an SDK assembly, and a pushing framework is simple.
Description
本申请涉及推送领域,更具体地,涉及一种消息推送方法、装置、电子设备及计算机可读介质。This application relates to the push field, and more specifically, to a message push method, device, electronic device, and computer-readable medium.
当前社会是一个信息量爆炸的时代,各类信息都以各种渠道方式传达到信息接收者,每个时刻都有形形色色的消息,传输的方式也千姿百态。目前手机的普及,网络科技技术的发达,使得信息的接收变得简单容易。随着互联网技术的发展,终端上的应用越来越多,消息推送作为传递信息的一种重要的手段,更是一种有效的拉动活跃的方式,被各大app厂商广泛使用。推送的消息可以是人工指定,也可以是服务根据用户兴趣计算得出。随着推荐系统的成熟,将其应用于推送更加的适合,通过推荐系统可以有效寻找用户关注的焦点,精准定位用户兴趣,推送用户感兴趣的内容,提升推送效果。The current society is an era of information explosion. All kinds of information are conveyed to information recipients through various channels. There are all kinds of news at every moment, and the way of transmission is also varied. At present, the popularization of mobile phones and the development of network technology have made it simple and easy to receive information. With the development of Internet technology, there are more and more applications on the terminal. As an important means of transmitting information, message push is an effective way to stimulate activity and is widely used by major app manufacturers. The pushed message can be manually designated, or it can be calculated by the service based on user interests. As the recommendation system matures, it is more suitable to apply it to push. The recommendation system can effectively find the focus of user attention, accurately locate user interests, push content that users are interested in, and improve the push effect.
但是,目前在现有技术中的消息推送的方案中,消息推送的结构依附类似zookeeper这样的第三方架构,结构过于复杂。However, in the current message push solution in the prior art, the structure of the message push depends on a third-party architecture like zookeeper, and the structure is too complicated.
发明内容Summary of the invention
本申请提出了一种消息推送方法、装置、电子设备及计算机可读介质,以改善上述缺陷。This application proposes a message push method, device, electronic equipment, and computer readable medium to improve the above-mentioned drawbacks.
第一方面,本申请实施例提供了一种消息推送方法,应用于推送系统的服务端,所述推送系统还包括至少一个客户端,所述方法包括:获取消息推送请求,所述消息推送请求包括指定客户端标识;基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件;基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。In the first aspect, an embodiment of the present application provides a message push method, which is applied to a server of a push system, the push system further includes at least one client, and the method includes: obtaining a message push request, the message push request It includes a designated client identifier; a designated connector is determined based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is the SDK component corresponding to the designated client; The designated connector sends the message to be pushed to the designated SDK component, so that the designated SDK component sends the message to be pushed to the designated client.
第二方面,本申请实施例还提供了一种消息推送装置,应用于推送系统的服务端,所述推送系统还包括至少一个客户端,所述消息推送装置包括:获取单元、确定单元和发送单元。获取单元,用于获取消息推送请求,所述消息推送请求包括指定客户端标识。确定单元,用于基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件。发送单元,用于基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。In the second aspect, the embodiments of the present application also provide a message pushing device, which is applied to the server of the pushing system, the pushing system further includes at least one client, and the message pushing device includes: an acquiring unit, a determining unit, and a sending unit. unit. The obtaining unit is configured to obtain a message push request, where the message push request includes a designated client identifier. The determining unit is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client. The sending unit is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
第三方面,本申请实施例还提供了一种电子设备,包括:一个或多个处理器;存储器;一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行上述 方法。In a third aspect, an embodiment of the present application also provides an electronic device, including: one or more processors; a memory; one or more application programs, wherein the one or more application programs are stored in the memory And is configured to be executed by the one or more processors, and the one or more application programs are configured to execute the foregoing method.
第四方面,本申请实施例还提供了一种计算机可读介质,所述可读存储介质存储有处理器可执行的程序代码,所述程序代码被所述处理器执行时使所述处理器执行上述方法。In a fourth aspect, an embodiment of the present application also provides a computer-readable medium, the readable storage medium stores program code executable by a processor, and when the program code is executed by the processor, the processor Perform the above method.
本申请提供的消息推送方法、装置、电子设备及计算机可读介质,获取指定客户端标识对应的消息推送请求,并基于该指定客户端标识确定指定连接器,指定客户端通过该指定客户端的指定SDK组件与指定连接器连接,然后,服务端通过该指定连接器将待推送消息发送至指定SDK组件,由指定SDK组件将该待推送消息发送至指定客户端。因此,通过连接器和SDK组件就能够实现消息的推送,推送架构简单。The message push method, device, electronic equipment, and computer-readable medium provided in this application obtain the message push request corresponding to the designated client identifier, and determine the designated connector based on the designated client identifier, and the designated client passes the designated client’s designation The SDK component is connected to the designated connector, and then the server sends the message to be pushed to the designated SDK component through the designated connector, and the designated SDK component sends the message to be pushed to the designated client. Therefore, the push of messages can be realized through the connector and SDK components, and the push structure is simple.
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application more clearly, the following will briefly introduce the drawings needed in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative work, other drawings can be obtained based on these drawings.
图1示出了本申请实施例消息推送方法的应用场景的示意图;FIG. 1 shows a schematic diagram of an application scenario of a message push method according to an embodiment of the present application;
图2示出了本申请一实施例提供的消息推送架构的示意图;Figure 2 shows a schematic diagram of a message push architecture provided by an embodiment of the present application;
图3示出了本申请一实施例提供的一种消息推送方法的方法流程图;FIG. 3 shows a method flowchart of a message pushing method provided by an embodiment of the present application;
图4示出了本申请另一实施例提供的一种消息推送方法的方法流程图;FIG. 4 shows a method flowchart of a message pushing method provided by another embodiment of the present application;
图5示出了本申请另一实施例提供的消息推送架构的示意图;FIG. 5 shows a schematic diagram of a message push architecture provided by another embodiment of the present application;
图6示出了本申请提供的消息跨区域通知的示意图;FIG. 6 shows a schematic diagram of a message cross-region notification provided by the present application;
图7示出了本申请又一实施例提供的一种消息推送方法的方法流程图;FIG. 7 shows a method flowchart of a message pushing method provided by another embodiment of the present application;
图8示出了本申请再一实施例提供的一种消息推送方法的方法流程图;FIG. 8 shows a method flowchart of a message pushing method provided by still another embodiment of the present application;
图9示出了本申请一实施例提供的一种消息推送装置的模块框图;FIG. 9 shows a block diagram of a message pushing device provided by an embodiment of the present application;
图10示出了本申请另一实施例提供的一种消息推送装置的模块框图;FIG. 10 shows a block diagram of a module of a message pushing device provided by another embodiment of the present application;
图11示出了本申请实施例提供的电子设备的示意图;FIG. 11 shows a schematic diagram of an electronic device provided by an embodiment of the present application;
图12是本申请实施例的用于保存或者携带实现根据本申请实施例的消息推送方法的程序代码的存储单元。FIG. 12 is a storage unit for storing or carrying program code for implementing the message pushing method according to the embodiment of the present application according to an embodiment of the present application.
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present application.
当前社会是一个信息量爆炸的时代,各类信息都以各种渠道方式传达到信息接收者,每个时刻都有形形色色的消息,传输的方式也千姿百态。目前手机的普及,网络科技技术的发达,使得信息的接收变得简单容易。随着互联网技术的发展,终端上的应用越来越多,消息推送作为传递信息的一种重要的手段,更是一种有效的拉动活跃的方式,被各大app厂商广泛使用。推送的消息可以是人工指定,也可以是服务根据用户兴趣计算得出。随着推荐系统的成熟,将其应用于推送更加的适合,通过推荐系统可以有效寻找用户关注的焦点,精准定位用户兴趣,推送用户感兴趣的内容,提升推送效果。The current society is an era of information explosion. All kinds of information are conveyed to information recipients through various channels. There are all kinds of news at every moment, and the way of transmission is also varied. At present, the popularization of mobile phones and the development of network technology have made it simple and easy to receive information. With the development of Internet technology, there are more and more applications on the terminal. As an important means of transmitting information, message push is an effective way to stimulate activity and is widely used by major app manufacturers. The pushed message can be manually designated, or it can be calculated by the service based on user interests. As the recommendation system matures, it is more suitable to apply it to push. The recommendation system can effectively find the focus of user attention, accurately locate user interests, push content that users are interested in, and improve the push effect.
请参考图1,图1示出了本申请实施例消息推送方法的应用场景的示意图,如图1中所示,用户终端10和服务器20位于无线网络或有线网络中,用户终端10和服务器20进行数据交互。Please refer to FIG. 1, which shows a schematic diagram of an application scenario of a message push method according to an embodiment of the present application. As shown in FIG. 1, a user terminal 10 and a server 20 are located in a wireless network or a wired network, and the user terminal 10 and the server 20 Perform data interaction.
在一些实施例中,客户端安装在用户终端10内,例如,可以是安装在用户终端10的应用程序。用户在客户端通过帐号登录,则该帐号对应的所有信息可以存储在服务器20的存储空间内。服务器20可以是单独的服务器,也可以是服务器集群,可以是本地服务器,也可以是云端服务器。In some embodiments, the client is installed in the user terminal 10, for example, it may be an application program installed in the user terminal 10. The user logs in through an account at the client, and all information corresponding to the account can be stored in the storage space of the server 20. The server 20 may be a separate server, or a server cluster, and may be a local server or a cloud server.
用户可以使用用户终端10通过网络与服务器20交互,以接收或发送消息等。用户终端10上可以安装有各种通讯客户端应用,例如网页浏览器应用、即时通信工具、社交平台软件等。The user can use the user terminal 10 to interact with the server 20 through the network to receive or send messages and so on. Various communication client applications, such as web browser applications, instant messaging tools, social platform software, etc., may be installed on the user terminal 10.
用户终端10可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The user terminal 10 may be various electronic devices having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop portable computer, a desktop computer, and so on.
服务器20可以是提供各种服务的服务器,例如对用户利用用户终端10所浏览的视频直播网站提供支持的服务器。服务器20可以对用户利用用户终端10产生的消息进行处理,服务器20可例如接收用户利用用户终端10产生的目标消息,服务器20可例如对接收到的推送信息等数据进行处理,服务器20还可例如将推送信息转发给其他的用户终端10。The server 20 may be a server that provides various services, for example, a server that provides support for a live video website browsed by the user using the user terminal 10. The server 20 can process messages generated by the user using the user terminal 10. The server 20 can, for example, receive target messages generated by the user using the user terminal 10. The server 20 can process the received push information and other data. The server 20 can also process The push information is forwarded to other user terminals 10.
服务器20可以是一个实体的服务器,还可例如为多个服务器组成的集群,服务器20中的一部分可例如作为本申请中的目标消息接收服务器,用于接收用户利用用户终端10产生的目标消息;服务器20中的一部分还可例如作为本申请中的推送服务器,用于将目标消息通过与接收组对应的推送服务器推送至所述接收组内的消息接收端。The server 20 may be a physical server, or may be, for example, a cluster composed of multiple servers. A part of the server 20 may be, for example, a target message receiving server in the present application for receiving target messages generated by users using the user terminal 10; A part of the server 20 may also be used as a push server in the present application, for example, for pushing the target message to the message receiving end in the receiving group through the push server corresponding to the receiving group.
如图2所示,图2示出了一种消息推送架构。As shown in Figure 2, Figure 2 shows a message push architecture.
注册鉴权模块也是集群部署的,通过前置的代理服务(Nginx)进行负载。其主要的目的是来做鉴权并返回一个令牌(token)给客户端。其中,Nginx是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。The registration authentication module is also deployed in a cluster, and is loaded through the front-end proxy service (Nginx). Its main purpose is to do authentication and return a token to the client. Among them, Nginx is a high-performance HTTP and reverse proxy web server, and also provides IMAP/POP3/SMTP services.
推送路由(push-server)集群之后它又多了一个作用,那就是得返回一台可供当前客户端使用的push-server。图2中的平台可以是指管理平台,它可以查看当前的实时在线数、给指定客户端推送消息等。推送消息则需要经过一个推送路由(push-server)找到真正的推送节点。After the push-server cluster has another function, it has to return a push-server that can be used by the current client. The platform in Figure 2 can refer to the management platform, which can view the current real-time online number, push messages to designated clients, and so on. Push messages need to go through a push-server to find the real push node.
所有的push-server在启动时候需要将自身的信息注册到协调服务(Zookeeper)中。ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件。它是一个为分布式应用提供一致性服务的软件,提供的功能包括:配置维护、域名服务、分布式同步、组服务等。注册鉴权模块会订阅Zookeeper中的节点,从而可以获取最新的服务列表。All push-servers need to register their information to the coordination service (Zookeeper) when they are started. ZooKeeper is a distributed, open source distributed application coordination service, an open source implementation of Google’s Chubby, and an important component of Hadoop and Hbase. It is a software that provides consistent services for distributed applications. The functions provided include: configuration maintenance, domain name services, distributed synchronization, group services, etc. The registration authentication module will subscribe to the nodes in Zookeeper, so that you can get the latest service list.
Zookeeper的核心是原子广播,这个机制保证了各个服务进程(Server)之间的同步。实现这个机制的协议叫做一致性协议(Zab协议)。Zab协议有两种模式,它们分别是恢复模式(选主)和广播模式(同步)。当服务启动或者在领导者崩溃后,Zab就进入了恢复模式,当领导者被选举出来,且大多数Server完成了和主进程(leader)的状态同步以后,恢复模式就结束了。状态同步保证了leader和Server具有相同的系统状态。The core of Zookeeper is atomic broadcasting. This mechanism ensures synchronization between various service processes (Server). The protocol that implements this mechanism is called the consensus protocol (Zab protocol). The Zab protocol has two modes, which are recovery mode (primary selection) and broadcast mode (synchronization). When the service starts or after the leader crashes, Zab enters the recovery mode. When the leader is elected and most of the servers are synchronized with the state of the main process (leader), the recovery mode ends. State synchronization ensures that the leader and server have the same system state.
为了保证事务的顺序一致性,zookeeper采用了递增的事务id号(zxid)来标识事务。所有的提议(proposal)都在被提出的时候加上了zxid。实现中zxid是一个64位的数字,它高32位是周期编号(epoch)用来标识leader关系是否改变,每次一个leader被选出来,它都会有一个新的epoch,标识当前属于那个leader的统治时期。低32位用于递增计数。In order to ensure the consistency of the transaction sequence, zookeeper uses an increasing transaction id number (zxid) to identify the transaction. All proposals are added with zxid when they are made. In the implementation, zxid is a 64-bit number, and its high 32-bit is the period number (epoch) used to identify whether the leader relationship has changed. Every time a leader is selected, it will have a new epoch that identifies the current leader. The period of reign. The lower 32 bits are used to count up.
在获取到所有的服务列表,依据预设标准为客户端选择合适的push-server。具体地,该预设标准可以包括:尽量保证各个节点的连接均衡,增删节点是否要做平衡。After obtaining the list of all services, select the appropriate push-server for the client according to preset standards. Specifically, the preset standard may include: try to ensure that the connection of each node is balanced, and whether to add or delete nodes to be balanced.
具体地,保证均衡有以下几种算法:轮询,即挨个将各个节点分配给客户端。但会出现新增节点分配不均匀的情况。哈希(Hash)取模的方式。类似于哈希散列表(HashMap),但也会出现轮询的问题。当然也可以像HashMap那样做一次平衡,让所有的客户端重新连接。不过这样会导致所有的连接出现中断重连,代价有点大。由于Hash取模方式的问题带来了一致性Hash算法,但依然会有一部分的客户端需要平衡。设置权重,即可以手动调整各个节点的负载情况,甚至可以做成自动的,基于监控当某些节点负载较高就自动调低权重,负载较低的可以提高权重。Specifically, there are several algorithms for ensuring balance: polling, that is, assigning each node to the client one by one. But there will be uneven distribution of new nodes. The way of Hash taking the modulus. Similar to HashMap, but there are also polling problems. Of course, you can do a balance like HashMap, and let all clients reconnect. However, this will cause all connections to be interrupted and reconnected, which is a bit expensive. Due to the problem of the Hash modulus method, a consistent Hash algorithm is brought about, but there will still be some clients that need to be balanced. Set the weight, that is, you can manually adjust the load of each node, or even make it automatic. Based on monitoring, when the load of some nodes is high, the weight will be automatically adjusted down, and the weight can be increased for the low load.
在平台向客户端推送消息的时候,需要首先知道这个客户端的通道保存在哪台节点上。也就是架构图中的存放路由关系的Redis(即路由存储器),在客户端接入push-server时需要将当前客户端唯一标识和服务节点的ip+port存进Redis。同时在客户端下线时候得在Redis中删掉这个连接关系。When the platform pushes messages to the client, it needs to know which node the client's channel is stored on. That is, Redis (ie, routing storage) that stores the routing relationship in the architecture diagram. When the client accesses the push-server, the unique identifier of the current client and the ip+port of the service node need to be stored in Redis. At the same time, this connection must be deleted in Redis when the client is offline.
假设客户端有10W个,首先可以为所有的客户端设置号码,即客户端标识。将这批号码通过平台下的Nginx下发到一个推送路由中。为了提高效率甚至可以将这批号码再次分散到每个推送路径(push-route)中。再根据号码的数量启动多线程的方式去之前的路由Redis中获取客户端所对应的push-server。再通过HTTP的方式调用push-server进行真正的消息下发。推送成功之后需要将结果更新到数据库中,不在线的客户端可以根据业务再次推送等。Assuming that there are 10W clients, first, you can set numbers for all clients, that is, client IDs. Send these numbers to a push route through Nginx under the platform. In order to improve efficiency, this batch of numbers can even be distributed to each push-route again. Then according to the number of numbers, start multi-threading to get the push-server corresponding to the client from the previous route Redis. Then call push-server through HTTP to deliver real messages. After the push is successful, the result needs to be updated to the database, and the offline client can push it again according to the business, etc.
如果在push-sever做业务不合适,则完全可以选择处理平台(Kafka)来解耦。将所有上行的数据直接输入Kafka。再由消费程序将数据取出写入数据库中即可。If it is not appropriate to do business in push-sever, you can completely choose the processing platform (Kafka) to decouple. Enter all upstream data directly into Kafka. Then the consumer program can take out the data and write it into the database.
其中,Kafka是一种消息消费机制,具体地,可以包括广播消费和单个消费。其中,广播消费为通过定义主题(topic)前缀来标识属于广播的消息,例如topicname:gonggao1535680698557,消费这些前缀为公告的消息时,不同的角色,不同的用户标识(userid)代表对应的用户组标识(groupid),实现广播消费。其中,单个消费:通过定义topic前缀为个人(person)的topic。例如,person1time1536031022097,其中,person和time中间的数字为当前用户,对应的在消费该消息时groupid固定,kafka就不能广播消费,只能对应某个用户消费了。Among them, Kafka is a message consumption mechanism, specifically, it can include broadcast consumption and single consumption. Among them, broadcast consumption is to identify the messages that belong to the broadcast by defining topic prefixes, such as topicname: gonggao1535680698557. When consuming these messages prefixed with announcements, different roles and different user IDs (userid) represent the corresponding user group IDs. (groupid), to achieve broadcast consumption. Among them, single consumption: by defining a topic prefixed by topic as a person (person). For example, person1time1536031022097, where the number between person and time is the current user, and the corresponding groupid is fixed when the message is consumed. Kafka cannot broadcast consumption and can only correspond to a certain user consumption.
然后,发明人在研究中发现,现有的推送架构中,结构比较复杂,例如,需要使用Kafka、redis、zookeeper等第三方中间件,同时,无法支持扩机房发消息。Then, the inventor found in his research that the existing push architecture has a complicated structure. For example, third-party middleware such as Kafka, redis, and zookeeper need to be used, and at the same time, it cannot support the expansion of the computer room to send messages.
因此,为了克服上述缺陷,本申请实施例提供了一种消息推送方法,该方法应用于推送系统,其中,推送系统包括服务端和至少一个客户端,具体地,该推送系统可以是图1所示的系统,则服务端可以是上述的服务器。于本申请实施例中,该方法的执行主体可以是服务端。如图3所示,该方法包括:S301至S303。Therefore, in order to overcome the above shortcomings, an embodiment of the present application provides a message push method, which is applied to a push system, wherein the push system includes a server and at least one client. Specifically, the push system may be the one shown in FIG. 1 In the system shown, the server can be the above-mentioned server. In the embodiment of the present application, the execution subject of the method may be the server. As shown in Fig. 3, the method includes: S301 to S303.
S301:获取消息推送请求。S301: Obtain a message push request.
其中,消息推送请求包括指定客户端标识。则该消息推送请求用于请求向指定客户端发送指定消息内容。Among them, the message push request includes a designated client identifier. Then the message push request is used to request to send the specified message content to the specified client.
作为一种实施方式,该消息推送请求内还包括消息标识,该消息标识用于请求向指定客户端发送该消息标识对应的消息,即该消息标识对应的消息作为待推送消息。As an implementation manner, the message push request further includes a message identifier, and the message identifier is used to request to send a message corresponding to the message identifier to a designated client, that is, the message corresponding to the message identifier is used as a message to be pushed.
作为一种实施方式,该消息推送请求内不包括消息推送标识,则服务端为每个客户端推送的内容是一致的,即预先存储待推送的内容,每个客户端所接受的待推送的内容相同,而该消息推送请求用于触发将预先获取的待推送的内容发送至指定客户端。As an implementation manner, if the message push request does not include the message push identifier, the content pushed by the server for each client is consistent, that is, the content to be pushed is pre-stored, and the content to be pushed accepted by each client The content is the same, and the message push request is used to trigger the pre-obtained content to be pushed to be sent to the designated client.
S302:基于所述指定客户端标识确定指定连接器。S302: Determine a designated connector based on the designated client identifier.
所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件。The designated connector is connected to a designated SDK component, where the designated SDK component is an SDK component corresponding to the designated client.
其中,连接器可以是服务端的一个端口,具体地,该端口可以是一个物理端口,也 可以是一个数据端口,该数据端口用于将数据按照一定格式打包,并且将打包之后的数据发送至与该端口连接的客户端或其他模块。例如,该连接器可以是一个API接口。Among them, the connector can be a port of the server. Specifically, the port can be a physical port or a data port. The data port is used to package data in a certain format and send the packaged data to the The client or other module connected to this port. For example, the connector can be an API interface.
作为一种实施方式,该服务端内存储有连接器对应表,该连接器对应表用于记录每个连接器对应的客户端标识。具体地,每个连机器对应一个连机器标识,通过连接器标识与客户端标识的对应关系能够记录连接器对应表。而通过该连接器对应表能够确定该消息推送请求内的指定客户端标识对应的连接器标识,进而确定指定客户端标识对应的指定连接器。As an implementation manner, a connector correspondence table is stored in the server, and the connector correspondence table is used to record the client identifier corresponding to each connector. Specifically, each connected machine corresponds to a connected machine ID, and the connector correspondence table can be recorded through the corresponding relationship between the connector ID and the client ID. The connector correspondence table can determine the connector identifier corresponding to the designated client identifier in the message push request, and then determine the designated connector corresponding to the designated client identifier.
作为一种实施方式,该指定客户端对应有SDK组件,则将该指定客户端对该的SDK组件命名为指定SDK组件。As an implementation manner, the designated client corresponds to an SDK component, and the SDK component for the designated client is named the designated SDK component.
其中,SDK(Software Development Kit)组件,一般为特定的软件包、软件框架、硬件平台、操作系统等建立应用软件时的开发工具的集合。具体地,SDK组件内集成有多个应该访问接口,则服务端能够通过所集成的访问接口与客户端连接。并且,每个客户端至少对应一个SDK组件。Among them, SDK (Software Development Kit) components are generally a collection of specific software packages, software frameworks, hardware platforms, operating systems and other development tools when building application software. Specifically, if multiple access interfaces are integrated in the SDK component, the server can connect to the client through the integrated access interface. And, each client corresponds to at least one SDK component.
在设备SDK组件内,集成有服务端与客户端之间的通信协议,则该SDK组件用于实现服务端与客户端之间的数据交互和通信。In the device SDK component, the communication protocol between the server and the client is integrated, and the SDK component is used to implement data interaction and communication between the server and the client.
作为一种实施方式,每个连接器可以连接至少一个SDK组件,具体地,服务端内设置有连接器管理记录,每个连接器对应一个连接器管理记录,该连接管理记录内包括该连接器所连接的每个SDK组件的标识。因此,在根据消息推送请求确定指定客户端标识对应的指定连接器之后,确定该指定连接器所连接的SDK组件,并且查找与指定客户端的标识对应的SDK组件作为指定SDK组件。As an implementation manner, each connector can be connected to at least one SDK component. Specifically, a connector management record is set in the server, and each connector corresponds to a connector management record, and the connection management record includes the connector The ID of each SDK component connected. Therefore, after determining the designated connector corresponding to the designated client identifier according to the message push request, the SDK component connected to the designated connector is determined, and the SDK component corresponding to the designated client identifier is searched for as the designated SDK component.
S303:基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。S303: Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
服务端通过指定连接器将待推送消息发送至所述指定SDK组件,从而指定客户端可以通过指定SDK组件获取待推送消息。The server sends the message to be pushed to the designated SDK component through the designated connector, so that the designated client can obtain the message to be pushed through the designated SDK component.
作为一种实施方式,指定SDK组件是集成在指定客户端内的,且指定客户端安装在用户终端内,并且用户终端内包括用于存储该指定客户端的数据的存储空间,指定SDK组件能够将待推送消息存储至指定客户端对应的存储空间内,并且通知指定客户端,该待推送信息已经存储至指定客户端对应的存储空间内,该指定客户端可以通过该存储空间获取到该待推送消息。As an implementation manner, the designated SDK component is integrated in the designated client, and the designated client is installed in the user terminal, and the user terminal includes a storage space for storing the data of the designated client. The designated SDK component can The message to be pushed is stored in the storage space corresponding to the designated client, and the designated client is notified that the message to be pushed has been stored in the storage space corresponding to the designated client, and the designated client can obtain the to-be pushed through the storage space information.
作为另一种实施方式,该指定SDK组件也可以安装在用户终端内,该用户终端为安装有指定客户端的终端,并且,SDK组件与该指定客户端是两个独立的程序,SDK组件作为指定客户端与指定连接器之间的通道,用于将所述待推送消息发送至所述指定客户端。As another implementation manner, the designated SDK component can also be installed in a user terminal. The user terminal is a terminal with a designated client installed, and the SDK component and the designated client are two independent programs, and the SDK component is used as the designated The channel between the client and the designated connector is used to send the message to be pushed to the designated client.
因此,服务端通过该指定连接器将待推送消息发送至指定SDK组件,由指定SDK组件将该待推送消息发送至指定客户端。所以,通过连接器和SDK组件就能够实现消息的推送,推送架构简单。Therefore, the server sends the message to be pushed to the designated SDK component through the designated connector, and the designated SDK component sends the message to be pushed to the designated client. Therefore, the push of messages can be realized through the connector and SDK components, and the push structure is simple.
请参阅图4,图4示出了一种消息推送方法,该方法应用于推送系统,其中,推送系统包括服务端和至少一个客户端,具体地,该推送系统可以是图1所示的系统,则服务端可以是上述的服务器。于本申请实施例中,该方法的执行主体可以是服务端。具体地,如图4所示,该方法包括:S401至S403。Please refer to Figure 4. Figure 4 shows a message push method, which is applied to a push system, where the push system includes a server and at least one client. Specifically, the push system may be the system shown in Figure 1 , The server can be the above-mentioned server. In the embodiment of the present application, the execution subject of the method may be the server. Specifically, as shown in FIG. 4, the method includes: S401 to S403.
S401:获取所述推送模块发送的所述消息推送请求。S401: Obtain the message push request sent by the push module.
作为一种实施方式,该服务端包括推送模块和数据库模块。如图5所示,该推送模块用于发起将消息推送至客户端的请求,即该推送模块可以作为消息推送的决策者,用于决定为客户端推送消息的推送策略。As an implementation manner, the server includes a push module and a database module. As shown in Figure 5, the push module is used to initiate a request to push messages to the client, that is, the push module can act as a decision maker for message push, and is used to determine a push strategy for pushing messages to the client.
作为一种实施方式,该推送模块包括服务智力组件、配置中心和注册中心。该注册中心可以是用于为各个服务器或者机房或者客户端实现注册、订阅的操作。例如,注册中心,是动态数据,这些数据在开发情况是不存在的,通过一些实例的启动停止,而产生和变动。比如一个新节点加入到了系统,或者有一个新的客户机(client)订阅了所有的服务变动,可以通过某个服务查找所有在线的实例。具体地,可以通过zookeeper、etc、nacos、etcd、redis、consul、eruka之类的技术实现。As an implementation manner, the push module includes a service intelligence component, a configuration center, and a registration center. The registration center may be used to implement registration and subscription operations for each server or computer room or client. For example, the registration center is dynamic data. These data do not exist in the development situation. They are generated and changed through the start and stop of some instances. For example, a new node is added to the system, or a new client is subscribed to all service changes, and all online instances can be found through a certain service. Specifically, it can be implemented through technologies such as zookeeper, etc, nacos, etcd, redis, consul, and eruka.
其中,配置中心可以是为分布式系统国内的各个节点进行参数配置。具体地,可以是人工配置和基于Jenkins或者Ansible的自动化部署。其中,人工配置的方式为由配置人员手动修改各个服务器的配置参数并且手动启动各个服务器的用于实现指定业务或完成指定任务的进程。具体地,可以是为各个节点推送配置文件,即所推送的消息为各个节点的配置文件。其中,节点设备在获取到配置文件之后,能够根据该配置文件配置用于运行所述指定程序的指定参数。其中,该指定参数可以包括与应用相关的参数。例如,该指定参数可以包括服务请求超时,线程池和队列的大小,缓存过期时间,数据库连接池的容量,日志输出级别,限流熔断阀值,服务安全黑白名单等。另外,该指定参数还可以包括运行环境的配置参数,例如,数据库、中间件和其它服务的连接字符串配置。该指定参数还可以包括安全配置的参数,例如,用户名,密码,访问令牌,许可证书等。Among them, the configuration center can perform parameter configuration for each node in the distributed system. Specifically, it can be manual configuration and automated deployment based on Jenkins or Ansible. Among them, the manual configuration method is that the configuration personnel manually modify the configuration parameters of each server and manually start the process of each server for realizing the specified service or completing the specified task. Specifically, the configuration file may be pushed for each node, that is, the pushed message is the configuration file of each node. Wherein, after the node device obtains the configuration file, it can configure the specified parameters for running the specified program according to the configuration file. Wherein, the designated parameter may include application-related parameters. For example, the specified parameters may include service request timeout, thread pool and queue size, cache expiration time, database connection pool capacity, log output level, current limit fuse threshold, service security black and white list, etc. In addition, the specified parameters may also include configuration parameters of the operating environment, for example, connection string configuration of databases, middleware, and other services. The specified parameters may also include security configuration parameters, for example, user name, password, access token, license certificate, etc.
则服务端获取消息推送请求的实施方式可以是,推送模块发送消息推送请求至数据库模块,从而数据库模块获取推送模块发送的所述消息推送请求。Then, an implementation manner for the server to obtain the message push request may be that the push module sends the message push request to the database module, so that the database module obtains the message push request sent by the push module.
作为一种实施方式,服务端还包括接口模块,具体地,上述的接口模块和连接器均属于数据库模块,具体地,该数据库模块包括接口模块、连接器和数据库管理系统。在一些实施例中,该接口模块用于实现推送模块与数据库管理系统连接,具体地,用于实现对数据库的读写操作。其中,数据库管理系统用于管理数据库。As an implementation manner, the server further includes an interface module. Specifically, the above-mentioned interface module and connector all belong to a database module. Specifically, the database module includes an interface module, a connector, and a database management system. In some embodiments, the interface module is used to realize the connection between the push module and the database management system, specifically, to realize the read and write operations on the database. Among them, the database management system is used to manage the database.
在一些实施例中,该推送模块可以是应用消息推送组件,即该推送模块可以是一个具有应用消息推送功能的应用程序,该服务端集成有应用消息推送组件,从而使得该服务端具有应用消息推送的功能,其中,应用消息推送组件可以是服务端为用户终端推送客户端消息的组件。In some embodiments, the push module may be an application message push component, that is, the push module may be an application with an application message push function, and the server is integrated with an application message push component, so that the server has an application message Push function, where the application message push component can be a component for the server to push client messages for the user terminal.
具体地,该应用消息推送组件可以是APP PUSH组件,则该推送模块可以是使用APP PUSH的应用系统,即APP PUSH组件可以是使用APP PUSH的应用系统。其中,应用系统一般由计算机硬件系统、系统软件、应用软件组成。计算机基本硬件系统由运算器和控制器、存储器、外围接口和外围设备权组成。系统软件包括操作系统、编译程序、数据库管理系统、各种高级语言等。应用软件由通用支援软件和各种应用软件包组成。则该应用软件可以是能够使用APP PUSH功能的软件。Specifically, the application message push component may be an APP PUSH component, and the push module may be an application system using APP PUSH, that is, the APP PUSH component may be an application system using APP PUSH. Among them, the application system generally consists of a computer hardware system, system software, and application software. The basic computer hardware system is composed of arithmetic unit and controller, memory, peripheral interface and peripheral equipment rights. System software includes operating system, compiler, database management system, various high-level languages, etc. The application software consists of general support software and various application software packages. Then the application software can be software that can use the APP PUSH function.
APP PUSH是指运营人员通过自己的产品或第三方工具对用户移动设备进行的主动消息推送。用户可以在移动设备锁定屏幕和通知栏看到push消息通知,通知栏点击可唤起APP并去往相应页面。APP PUSH refers to the active push of messages to users' mobile devices by operators through their own products or third-party tools. Users can see push message notifications on the lock screen and notification bar of their mobile devices. Tap on the notification bar to wake up the APP and go to the corresponding page.
作为一种实施方式,该接口模块作为APP PUSH的接口,其定义了推送模块与数据库模块之间的数据传输格式,同时,不同的服务端之间的通信也可以通过该接口模块。在一些实施例中,所要发送至客户端的消息以消息队列的形式输入该接口模块,接口模块再写入数据库管理系统,以便在数据库内存储该消息的内容。As an implementation manner, the interface module is used as an APP PUSH interface, which defines the data transmission format between the push module and the database module. At the same time, communication between different servers can also pass through the interface module. In some embodiments, the message to be sent to the client is input to the interface module in the form of a message queue, and the interface module is written into the database management system to store the content of the message in the database.
在一些实施例中,该数据库管理系统可以是关系型数据库管理系统(MYSQL),该连接器可以是Connector,具体地,MySQL Connector是MySQL数据库客户端编程的接口,它提供了通过网络访问数据库的接口。In some embodiments, the database management system may be a relational database management system (MYSQL), and the connector may be a Connector. Specifically, MySQL Connector is an interface for MySQL database client programming, which provides access to the database through the network. interface.
作为一种实施方式,获取所述推送模块发送的所述消息推送请求的方式可以是, 接口模块获取所述推送模块发送的消息推送请求;所述接口模块将所述消息推送请求写入所述数据库模块,即该接口模块为推送模块提供了访问数据库的接口,具体地,该接口可以是应用层的一个API接口。在一些实施例中,该接口模块可以是HTTP API,即推送模块与接口模块之间基于HTTP协议传输数据。As an implementation manner, the method for obtaining the message push request sent by the push module may be that the interface module obtains the message push request sent by the push module; the interface module writes the message push request into the The database module, that is, the interface module provides an interface for the push module to access the database. Specifically, the interface may be an API interface at the application layer. In some embodiments, the interface module may be HTTP API, that is, data is transmitted between the push module and the interface module based on the HTTP protocol.
S402:基于所述指定客户端标识确定指定连接器。S402: Determine a designated connector based on the designated client identifier.
S403:基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。S403: Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
作为一种实施方式,该接口模块将所述消息推送请求写入所述数据库模块,该消息推送请求内包括指定客户端标识,则数据库模块基于所述消息推送请求建立与所述指定客户端标识对应的消息推送任务。该消息推送任务可以包括指定客户端标识。As an implementation manner, the interface module writes the message push request into the database module, and the message push request includes a designated client identifier, and the database module establishes a connection with the designated client identifier based on the message push request. Corresponding message push task. The message push task may include a designated client identifier.
在一些实施例中,该接口模块将所述消息推送请求写入数据库管理系统,该消息推送任务还包括待推送消息的标识,数据库管理系统基于指定客户端的标识确定指定连接器,将待推送消息的标识发送至指定连接器,该指定连接器根据该待推送消息的标识由数据库内获取该待推送消息的标识对应的待推送消息,并且将待推送消息发送至所述指定SDK组件。In some embodiments, the interface module writes the message push request to the database management system. The message push task also includes the identification of the message to be pushed. The database management system determines the specified connector based on the identification of the specified client, and sends the message to be pushed. The identifier of is sent to the designated connector, and the designated connector obtains the message to be pushed corresponding to the identifier of the message to be pushed from the database according to the identifier of the message to be pushed, and sends the message to be pushed to the designated SDK component.
在另一些实施例中,数据库模块包括多个连接器,每个连接器定时读取数据库管理系统内的消息推送任务,并且根据该消息推送任务内的指定客户端标识能够识别每个消息推送任务对应的连接器,然后,获取与自己对应的消息推送任务,并根据该消息推送任务确定待推送消息。In other embodiments, the database module includes a plurality of connectors, and each connector periodically reads the message push task in the database management system, and can identify each message push task according to the designated client identifier in the message push task. The corresponding connector then obtains the message push task corresponding to itself, and determines the message to be pushed according to the message push task.
在有一些实施例中,还可以是数据库管理系统所建立的消息推送任务内包括指定连接器的标识和待推送消息的标识,每个连接器能够扫描所有的消息推送任务,并且识别消息推送任务内的连接器的标识,从而指定连接器能够扫描到包含有指定连接器的标识的消息推送任务,从而能够获取该消息推送任务并且确定待推送消息。In some embodiments, the message push task established by the database management system may also include the identifier of the designated connector and the identifier of the message to be pushed. Each connector can scan all message push tasks and identify the message push task. The identifier of the connector within, so that the specified connector can scan the message push task containing the identifier of the specified connector, so that the message push task can be obtained and the message to be pushed can be determined.
作为一种实施方式,指定连接器基于预设时间周期由所述数据库模块中获取所述消息推送任务。具体地,可以是指定连接器基于预设时间周期扫描所有的消息推送任务,并且查找到与指定连接器对应的消息推送任务。还可以是,数据库管理系统按照预设时间周期向指定连接器下发消息推送任务。其中,预设时间周期可以根据用户需求而设定,例如,可以是1秒。As an implementation manner, the designated connector obtains the message push task from the database module based on a preset time period. Specifically, it may be that the designated connector scans all message push tasks based on a preset time period, and finds the message push task corresponding to the designated connector. It may also be that the database management system issues a message push task to the designated connector according to a preset time period. Wherein, the preset time period can be set according to user requirements, for example, it can be 1 second.
具体地,请参阅图5,使用App Push的应用系统(例:注册中心)只需向App Push系统的服务端的HTTP API发送下发消息的请求,即发送消息推送请求。同时指定客户端,其中,该指定客户端可以是一个,也可以是多个。然后,由HTTP API向MySQL写入下发的消息推送任务。Specifically, referring to Figure 5, an application system that uses App Push (for example: a registry) only needs to send a message delivery request to the HTTP API of the server of the App Push system, that is, send a message push request. At the same time specify the client, where the specified client can be one or multiple. Then, the HTTP API writes the sent message push task to MySQL.
在预设时间周期之后(最晚1秒后),由指定连接器从MySQL中获取该客户端的任务消息列表。同时下发消息至该客户端。其中,指定连接器为与指定客户端(接入App Push SDK的客户端)所建立连接的连接器。After a preset time period (after 1 second at the latest), the designated connector obtains the client's task message list from MySQL. At the same time, a message is sent to the client. Among them, the designated connector is the connector that establishes a connection with the designated client (the client that accesses the App Push SDK).
作为一种实施方式,还可以实现多个服务端之间的消息通知,即实现跨机房的消息通知。As an implementation manner, it is also possible to implement message notification between multiple servers, that is, to implement message notification across computer rooms.
具体地,所述接口模块获取其他服务端发送的同步请求,所述同步请求包括指定消息的描述内容;若所述指定消息的描述内容与所述待推送消息的描述内容一致,则所述接口模块将所述待推送消息发送至所述其他服务端的接口模块。Specifically, the interface module obtains a synchronization request sent by another server, and the synchronization request includes the description content of a specified message; if the description content of the specified message is consistent with the description content of the message to be pushed, the interface The module sends the message to be pushed to the interface module of the other server.
其中,描述内容可以是对消息的内容的描述,例如,可以是消息的摘要,作为消息的内容的介绍。作为一种实施方式,每个消息对应一个摘要,则该描述内容可以是该消息的摘要,该描述内容可以包括消息的内容的介绍、所需推送的客户端信息,该客户端信息可以包括客户端的标识和类型中的至少一种。作为一种实施方式,该客户端信息可 以包括客户端标识,则其他服务端发送的同步请求内包括所需推送的客户端的标识,而接口模块内包括推送模块发送的多个消息推送请求,且每个消息推送请求包括客户端的标识。Wherein, the description content may be a description of the content of the message, for example, it may be a summary of the message as an introduction to the content of the message. As an implementation manner, each message corresponds to a summary, the description content may be a summary of the message, the description content may include an introduction to the content of the message, the client information to be pushed, and the client information may include the client At least one of the identification and type of the terminal. As an implementation manner, the client information may include the client identifier, the synchronization request sent by the other server includes the identifier of the client to be pushed, and the interface module includes multiple message push requests sent by the push module, and Each message push request includes the identification of the client.
作为一种实施方式,该接口模块可以设置消息队列,该消息队列包括多个消息推送请求,则该接口模块获取到其他服务端发送的同步请求,解析该同步请求获得客户端信息,查找与该客户端信息匹配的消息推送请求,将所匹配的消息推送请求作为指定消息推送请求,将该指定消息推送请求对应的消息内容发送至该其他服务端,以实现消息的同步和跨区域的消息通知。其中,其他的服务端可以将该同步的消息推送至所对应的客户端。As an implementation manner, the interface module can set a message queue, and the message queue includes multiple message push requests, then the interface module obtains synchronization requests sent by other servers, parses the synchronization requests to obtain client information, and finds information related to the The message push request that matches the client information, the matched message push request is used as the designated message push request, and the message content corresponding to the designated message push request is sent to the other server to achieve message synchronization and cross-region message notification . Among them, other servers can push the synchronized message to the corresponding client.
如图6所示,其中,图6示出了两个机房,分别为中心机房和A机房,每个机房均包括上述的服务端和每个服务端对应的客户端。A机房的HTTP API向中心机房的HTTP API发送同步请求,通过HTTP API之间的交互,可以实现跨机房的消息通知,也就是说,不同机房的HTTP API会不断从中心机房HTTP API获取本机房需要的通知消息。As shown in Figure 6, Figure 6 shows two computer rooms, namely the central computer room and the A computer room. Each computer room includes the aforementioned server and a client corresponding to each server. The HTTP API of the computer room A sends a synchronization request to the HTTP API of the central computer room. Through the interaction between HTTP APIs, message notifications across computer rooms can be realized. That is to say, the HTTP API of different computer rooms will continue to obtain the local computer room from the HTTP API of the central computer room. Required notification message.
因此,本申请实施例提供的用于实施消息推送方法的消息推送系统,落地难度低且升级维护简单,扩展简单。Connector的连接数可以支持百万以上的客户端连接,同时可以添加多个Connector和Http Api来分散客户端或服务端的连接。同时,配套的App push SDK使用简单。配置中心、注册中心能很简单接入,并且在同一个SDK内可以复用同一个通道。并且解决了不同系统由不同通道导致资源消耗的问题。Therefore, the message push system for implementing the message push method provided by the embodiment of the present application has low landing difficulty, simple upgrade and maintenance, and simple extension. The number of Connector connections can support more than one million client connections. At the same time, multiple Connectors and HTTP APIs can be added to decentralize client or server connections. At the same time, the supporting App push SDK is easy to use. The configuration center and the registration center can be easily accessed, and the same channel can be reused in the same SDK. And it solves the problem of resource consumption caused by different channels in different systems.
另外,在执行将待推送消息发送至指定SDK组件之后,还可以检测是否成功将消息发送至客户端,然后,基于检测结果,对于未成功发送的情况下,再次发送。In addition, after the execution of sending the message to be pushed to the specified SDK component, it can also detect whether the message is successfully sent to the client, and then, based on the detection result, if the message is not sent successfully, it is sent again.
具体地,请参阅图7,图7示出了一种消息推送方法,该方法应用于推送系统,其中,推送系统包括服务端和至少一个客户端,具体地,该推送系统可以是图1所示的系统,则服务端可以是上述的服务器。于本申请实施例中,该方法的执行主体可以是服务端。具体地,如图7所示,该方法包括:S701至S705。Specifically, please refer to FIG. 7. FIG. 7 shows a message push method applied to a push system. The push system includes a server and at least one client. Specifically, the push system may be the one shown in FIG. In the system shown, the server can be the above-mentioned server. In the embodiment of the present application, the execution subject of the method may be the server. Specifically, as shown in FIG. 7, the method includes: S701 to S705.
S701:获取消息推送请求。S701: Obtain a message push request.
S702:基于所述指定客户端标识确定指定连接器。S702: Determine a designated connector based on the designated client identifier.
S703:基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。S703: Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
S704:检测所述指定客户端的消息推送结果。S704: Detect the message push result of the designated client.
作为一种实施方式,可以根据指定客户端回复的信息来检测所述指定客户端的消息推送结果,还可以是根据上述的指定客户端的消息推送记录,检测所述指定客户端的消息推送结果。As an implementation manner, the message push result of the designated client may be detected according to the information replies from the designated client, or the message push result of the designated client may be detected according to the message push record of the designated client described above.
具体地,检测所述指定客户端的消息推送结果的实施方式可以是,检测是否接收到所述指定客户端反馈的同步成功接收消息的指示信息;若成功接收到,则判定所述消息推送结果为成功接收消息;若未成功接收到,则判定所述消息推送结果为未成功接收消息。Specifically, the implementation manner of detecting the message push result of the designated client may be to detect whether the indication information of the synchronous successful reception message fed back by the designated client is received; if it is successfully received, it is determined that the message push result is The message is successfully received; if it is not successfully received, it is determined that the message push result is an unsuccessful message reception.
其中,消息推送结果包括两个结果,分别为成功接收消息和未成功接收消息。其中,成功接收消息表示客户端成功接收到了服务端推送的消息,未成功接收消息表示客户端未成功接收到服务端推送的消息。其中,客户端反馈的同步成功接收消息的指示信息可以是一个文本消息、语音、图片或视频等格式的信息,也可以是一个参数值,用于表征已经成功接收到了服务端推送的消息。Among them, the message push result includes two results, which are successfully received messages and unsuccessfully received messages. Wherein, the successful reception of the message indicates that the client has successfully received the message pushed by the server, and the unsuccessful reception of the message indicates that the client has not successfully received the message pushed by the server. Wherein, the indication information of the synchronously successfully received message fed back by the client can be a text message, voice, picture, or video format information, or a parameter value used to indicate that the message pushed by the server has been successfully received.
作为一种实施方式,可以是检测预设时间段内是否接收到所述指定客户端反馈的同步成功接收消息的指示信息。其中,预设时间段的时间起点可以是执行基于所述指定连接器将待推送消息发送至所述指定SDK组件的操作的时间点,该预定时间段的预 定时间长度可以是预先确定的,例如,可以是根据经验而设置的。则在此实施例中,在执行基于所述指定连接器将待推送消息发送至所述指定SDK组件之后,会等待指定客户端反馈同步成功接收消息的指示信息,即判定在预设时间段内是否接收到指定客户端反馈的同步成功接收消息的指示信息。As an implementation manner, it may be detecting whether the indication information of the synchronization successful reception message fed back by the designated client is received within a preset time period. Wherein, the time starting point of the preset time period may be the time point at which the operation of sending the message to be pushed to the specified SDK component based on the specified connector is performed, and the predetermined time length of the predetermined time period may be predetermined, for example, , Can be set based on experience. Then, in this embodiment, after the execution of sending the message to be pushed to the designated SDK component based on the designated connector, it will wait for the designated client to feed back the indication information that the synchronization has successfully received the message, that is, it is determined that it is within the preset time period. Whether to receive the indication information of the synchronization successful reception message fed back by the specified client.
作为另一种实施方式,在执行基于所述指定连接器将待推送消息发送至所述指定SDK组件之后,会发送一个确认请求至指定客户端,该确认请求用于指示指定客户端反馈该指定信息。则可以将发送该确认请求的时间点作为该预设时间段的时间起点,然后,判断在该预设时间段内是否接收到指定客户端基于确认请求反馈的该指定信息。As another implementation manner, after sending the message to be pushed to the designated SDK component based on the designated connector, a confirmation request is sent to the designated client, and the confirmation request is used to instruct the designated client to feed back the designated SDK component. information. Then, the time point at which the confirmation request is sent may be taken as the time starting point of the preset time period, and then it is determined whether the specified information fed back by the specified client based on the confirmation request is received within the preset time period.
另外,在一些实施例中,服务端向客户端推送的消息会被记录并且被设置消息标识,具体地,将服务端确定的需要向指定客户端推送的消息对应的消息标识命名为第一消息标识。客户端在获取到服务端推送的消息之后,会将所推送的消息的标识反馈至服务端,以便服务端能够根据客户端所反馈的消息的标识以及所推动至客户端的消息的标识,确定客户端是否成功接收到待推送消息。In addition, in some embodiments, the message pushed by the server to the client is recorded and the message identifier is set. Specifically, the message identifier corresponding to the message determined by the server to be pushed to the specified client is named the first message Logo. After the client obtains the message pushed by the server, it will feed back the identifier of the pushed message to the server, so that the server can determine the client based on the identifier of the message fed back by the client and the identifier of the message pushed to the client Whether the terminal successfully receives the message to be pushed.
具体地,检测所述指定客户端的消息推送结果的实施方式可以是,获取所述服务端向所述指定客户端发送的消息对应的第一消息标识;获取所述指定客户端反馈的第二消息标识,所述第二消息标识为所述指定客户端成功接收的消息对应的第一消息标识;根据所述第一消息标识和所述第二消息标识确定所述指定客户端的消息推送结果。Specifically, the implementation manner of detecting the message push result of the designated client may be to obtain the first message identifier corresponding to the message sent by the server to the designated client; and to obtain the second message fed back by the designated client An identifier, the second message identifier is a first message identifier corresponding to a message successfully received by the designated client; the message push result of the designated client is determined according to the first message identifier and the second message identifier.
作为一种实施方式,服务端向所述指定客户端发送至少一个消息,并且每个消息都对应一个第一消息标识,然后,客户端将所有成功接收的消息的第一消息标识均记为第二消息标识。例如,服务端向所述指定客户端发送5个消息,该5个消息的第一消息标识分别记为mes1、mes2、mes3、mes4、mes5,客户端成功接收的消息为mes2、mes3和mes4,则客户端将mes2、mes3和mes4记为第二消息标识,并将第二消息标识返回至服务端。服务端判断该第二消息标识与第一消息标识,是否匹配,如果匹配,则判定所述消息推送结果为成功接收消息;如果不匹配,则判定所述消息推送结果为未成功接收消息。例如,上述例子中,第二消息标识为mes2、mes3和mes4,服务通过匹配该第一消息标识和第二消息标识,能够确定mes2、mes3和mes4被客户端成功接收到,但是,mes1和mes5未被成功接收。As an implementation manner, the server sends at least one message to the designated client, and each message corresponds to a first message identifier. Then, the client records the first message identifier of all successfully received messages as the first message identifier. 2. Message identification. For example, the server sends 5 messages to the designated client, and the first message identifiers of the 5 messages are respectively marked as mes1, mes2, mes3, mes4, and mes5, and the messages successfully received by the client are mes2, mes3, and mes4. The client then marks mes2, mes3, and mes4 as the second message identifiers, and returns the second message identifiers to the server. The server determines whether the second message identifier matches the first message identifier, and if it matches, it determines that the message push result is a successfully received message; if it does not match, it determines that the message push result is an unsuccessful message received. For example, in the above example, the second message identifiers are mes2, mes3, and mes4. By matching the first message identifier and the second message identifier, the service can determine that mes2, mes3, and mes4 are successfully received by the client, but mes1 and mes5 It was not successfully received.
在一些实施例中,判断所述第一消息标识和所述第二消息标识是否匹配的实施方式,可以是确定该第一消息标识和第二消息标识是否相同,例如,第一消息标识为mes1,第二消息标识为mes1,则表示该第一消息标识和第二消息标识匹配。而如果第一消息标识为mes1,第二消息标识为mes2,则表示该第一消息标识和第二消息标识不匹配,则可能标识客户端未成功获取到mes1对应的消息,例如,所接收的mes2可能是其他的服务端发送的。In some embodiments, the implementation manner for determining whether the first message identifier and the second message identifier match may be determining whether the first message identifier and the second message identifier are the same, for example, the first message identifier is mes1 , The second message identifier is mes1, which means that the first message identifier matches the second message identifier. If the first message identifier is mes1 and the second message identifier is mes2, it means that the first message identifier and the second message identifier do not match, which may indicate that the client has not successfully obtained the message corresponding to mes1, for example, the received message Mes2 may be sent by another server.
S705:若所述消息推送结果为未成功接收消息,则再次将所述待推送消息发送至所述指定客户端。S705: If the message push result is that the message is not successfully received, send the message to be pushed to the designated client again.
如果判定所述待推送消息未成功发送至所述指定客户端,则再次将所述待推送消息发送至所述指定客户端。在一些实施例中,之后再次返回执行检测所述指定客户端的消息推送结果的操作,直至待推送消息被成功发送至所述指定客户端。If it is determined that the message to be pushed is not successfully sent to the designated client, then the message to be pushed is sent to the designated client again. In some embodiments, the operation of detecting the message push result of the designated client is performed again afterwards, until the message to be pushed is successfully sent to the designated client.
作为一种实施方式,可以是限制再次发送的数量,具体地,S705的实施方式可以是,再次将所述待推送消息发送至所述指定客户端,并统计发送次数,如果次数大于指定数值,则停止执行再次将所述待推送消息发送至所述指定客户端的操作。其中,指定数值可以根据需求而设定,As an implementation manner, the number of retransmissions may be limited. Specifically, the implementation manner of S705 may be that the message to be pushed is sent to the designated client again, and the number of transmissions is counted. If the number of times is greater than a designated value, Then stop performing the operation of sending the message to be pushed to the designated client again. Among them, the specified value can be set according to needs,
具体地,基于所述指定连接器将待推送消息发送至所述指定SDK组件之后,检测所述指定客户端的消息推送结果;若所述消息推送结果为未成功接收消息,则记录服务端 将所述待推送消息发送至所述指定SDK组件的次数,判断所述次数是否大于指定数值,如果小于或等于,则再次将所述待推送消息发送至所述指定客户端,并更新所述次数,同时,返回执行检测所述指定客户端的消息推送结果的步骤以及后续操作。Specifically, after the message to be pushed is sent to the designated SDK component based on the designated connector, the message push result of the designated client is detected; if the message push result is that the message is not successfully received, the server will record the message push result. The number of times the message to be pushed is sent to the designated SDK component, and it is determined whether the number is greater than a designated value, and if it is less than or equal to, the message to be pushed is sent to the designated client again, and the number is updated, At the same time, it returns to execute the step of detecting the message push result of the designated client and subsequent operations.
另外,上述实施例针对某一时间段仅推送一个消息的情况下,可以参考上述实施方式确定是否成功发送至指定客户端,而当待推送的消息为多个的时候,可以通过设置一个发送队列的方式,将多个消息发送至客户端。In addition, in the above embodiment, when only one message is pushed for a certain period of time, you can refer to the above embodiment to determine whether it is successfully sent to the specified client, and when there are multiple messages to be pushed, you can set a sending queue Way to send multiple messages to the client.
具体地,请参阅图8,图8示出了一种消息推送方法,该方法应用于推送系统,其中,推送系统包括服务端和至少一个客户端,具体地,该推送系统可以是图1所示的系统,则服务端可以是上述的服务器。于本申请实施例中,该方法的执行主体可以是服务端。具体地,如图8所示,该方法包括:S801至S804。Specifically, please refer to FIG. 8. FIG. 8 shows a message push method applied to a push system. The push system includes a server and at least one client. Specifically, the push system may be the one shown in FIG. In the system shown, the server can be the above-mentioned server. In the embodiment of the present application, the execution subject of the method may be the server. Specifically, as shown in FIG. 8, the method includes: S801 to S804.
S801:获取消息推送请求。S801: Obtain a message push request.
S802:基于所述指定客户端标识确定指定连接器。S802: Determine a designated connector based on the designated client identifier.
S803:根据预设发送顺序确定多个所述待推送消息对应的消息发送队列。S803: Determine the message sending queues corresponding to the multiple messages to be pushed according to the preset sending order.
于本申请实施例中,待推送信息为多个,则服务端可以为该多个待推送消息设置消息发送队列。例如,待推送信息为5个,该5个待推送信息对应的第一消息标识分别为mes1、mes2、mes3、mes4、mes5,则所确定的消息发送队列为[mes1,mes2,mes3,mes4,mes5]。In the embodiment of the present application, if there are multiple messages to be pushed, the server can set a message sending queue for the multiple messages to be pushed. For example, if there are 5 messages to be pushed, and the first message identifiers corresponding to the 5 messages to be pushed are mes1, mes2, mes3, mes4, and mes5 respectively, the determined message sending queue is [mes1, mes2, mes3, mes4, mes5].
S804:基于所述指定连接器根据所述消息发送队列依次将多个所述待推送消息发送至所述指定SDK组件。S804: Send the multiple messages to be pushed to the designated SDK component in sequence based on the designated connector and according to the message sending queue.
作为一种实施方式,该消息发送队列对应有序号,则mes1对应的序号为序号1,mes2对应的序号为序号2,mes3对应的序号为序号3,mes4对应的序号为序号4,mes5对应的序号为序号5,服务端依据该消息发送队列内各个消息的序号依次将多个待推送消息发送至客户端。As an implementation manner, the message sending queue corresponds to a sequence number, the sequence number corresponding to mes1 is sequence number 1, the sequence number corresponding to mes2 is sequence number 2, the sequence number corresponding to mes3 is sequence number 3, the sequence number corresponding to mes4 is sequence number 4, and the sequence number corresponding to mes5 is The sequence number is sequence number 5. The server sends multiple messages to be pushed to the client in sequence according to the sequence numbers of each message in the message sending queue.
在一些实施例中,服务端依据该消息发送列表将每个待推送消息发送至客户端。具体地,可以是在客户端设定一个流水号,每成功接收到一个消息,则更新一次该流水号。具体地,将各个消息在消息发送队列内的序号记为第一序列号,将客户端统计的记录成功接收到的消息的流水号记录为第二序列号。In some embodiments, the server sends each message to be pushed to the client according to the message sending list. Specifically, a serial number may be set on the client, and the serial number is updated every time a message is successfully received. Specifically, the serial number of each message in the message sending queue is recorded as the first serial number, and the serial number of the successfully received message recorded by the client's statistics is recorded as the second serial number.
于本申请实施例中,假设第一序列号为seq1,初始值为0,则第一次发送消息之后,该第一序列号seq1的数值变为1,第二次发送消息之后,该第一序列号seq1的数值变为2,依次类推,如果待推送消息为多个,该分别为mes1、mes2、mes3、mes4和mes5,第一消息标识和序列号seq1的数值的对应关系为:mes1、mes2、mes3、mes4和mes5对应的序列号seq1依次为1、2、3、4和5。In the embodiment of the present application, assuming that the first sequence number is seq1 and the initial value is 0, after the message is sent for the first time, the value of the first sequence number seq1 becomes 1, and after the message is sent for the second time, the first sequence number The value of the sequence number seq1 becomes 2, and so on, if there are multiple messages to be pushed, these are mes1, mes2, mes3, mes4, and mes5. The corresponding relationship between the first message identifier and the value of the sequence number seq1 is: mes1 The sequence numbers seq1 corresponding to mes2, mes3, mes4, and mes5 are 1, 2, 3, 4, and 5 in order.
假设第二序列号为seq2,则初始值为0,则第一次指定客户端成功接收到消息的时候,该第二序列号seq2的数值变为1,第二次指定客户端成功接收到消息的时候,该第二序列号seq2的数值变为2,依次类推,如果指定客户端成功接收到消息包括多个,分别为mes1、mes2、mes3、mes4和mes5,,序列号seq2依次为1、2、3、4和5。Assuming that the second sequence number is seq2, the initial value is 0. When the first designated client successfully receives the message, the value of the second sequence number seq2 becomes 1, and the second designated client successfully receives the message When, the value of the second sequence number seq2 becomes 2, and so on, if the designated client successfully receives multiple messages, namely mes1, mes2, mes3, mes4, and mes5, the sequence number seq2 is 1, in turn 2, 3, 4, and 5.
需要说明的话,指定客户端的seq2,在成功接收到消息的时候,该seq2才会更改。If you need to explain, specify the seq2 of the client, and the seq2 will be changed when the message is successfully received.
因此,可以根据第一序列号和第二序列号的大小关系确定是否将待推送消息成功发送至所述指定客户端。具体地,获取所述第一序列号和所述第二序列号之间的大小关系;如果所述大小关系满足指定条件,则判定将待推送消息成功发送至所述指定客户端,否则,判定未成功将待推送消息发送至所述指定客户端。Therefore, it can be determined whether the message to be pushed is successfully sent to the designated client according to the size relationship between the first sequence number and the second sequence number. Specifically, the size relationship between the first sequence number and the second sequence number is acquired; if the size relationship meets a specified condition, it is determined that the message to be pushed is successfully sent to the specified client; otherwise, it is determined The message to be pushed is not successfully sent to the designated client.
其中,该大小关系可以是第一序列号是否小于或等于第二序列号,或者其他的能够表征第一序列号是否小于或等于第二序列号的大小关系,例如,也可以是获取该第一序列号和所述第二序列号之间比值,如果该比值大于1,则表明第一序列号大于第二 序列号,如果该比值不大于1,则表明第一序列号小于或等于第二序列号。Wherein, the size relationship may be whether the first serial number is less than or equal to the second serial number, or another size relationship that can characterize whether the first serial number is less than or equal to the second serial number, for example, it may also be the acquisition of the first serial number. The ratio between the serial number and the second serial number. If the ratio is greater than 1, it indicates that the first serial number is greater than the second serial number. If the ratio is not greater than 1, it indicates that the first serial number is less than or equal to the second serial number. No.
具体地,如果第一序列号小于或等于第二序列号,则表示将待推送消息成功发送至所述指定客户端。例如,mes2的第一序列号为2,表示当前发送了2个消息,即mes1的第一序列号为1,如果第二序列号为2,则表明已经成功接收到了两个消息,则可以判定成功接收到了mes2。Specifically, if the first sequence number is less than or equal to the second sequence number, it means that the message to be pushed is successfully sent to the designated client. For example, the first sequence number of mes2 is 2, which means that 2 messages are currently sent, that is, the first sequence number of mes1 is 1. If the second sequence number is 2, it means that two messages have been successfully received, and it can be determined Successfully received mes2.
在一些实施例中,基于所述指定连接器根据所述消息发送队列依次将多个所述待推送消息发送至所述指定SDK组件之后,确定未成功发送至所述指定客户端的待推送消息,作为失败消息;将所述失败消息发送至所述指定SDK组件。In some embodiments, after the designated connector sequentially sends a plurality of the messages to be pushed to the designated SDK component according to the message sending queue, it is determined that the messages to be pushed are not successfully sent to the designated client, As a failure message; sending the failure message to the designated SDK component.
具体地,每个所述待推送消息对应一所述第一消息标识,且多个所述第一消息标识与所述消息发送队列内的序号一一对应,即上述的mes1至mes5,mes1对应的序号为序号1,mes2对应的序号为序号2,mes3对应的序号为序号3,mes4对应的序号为序号4,mes5对应的序号为序号5,则如果根据该消息发送队列的序号将消息发送队列内的各个消息依次发送至指定客户端,则上述消息发送队列[mes1,mes2,mes3,mes4,mes5]的各个消息的发送顺序为mes1,mes2,mes3,mes4,mes5。Specifically, each of the messages to be pushed corresponds to the first message identifier, and a plurality of the first message identifiers correspond to the sequence numbers in the message sending queue in a one-to-one correspondence, that is, the aforementioned mes1 to mes5, and mes1 correspond to The serial number is serial number 1, the serial number corresponding to mes2 is serial number 2, the serial number corresponding to mes3 is serial number 3, the serial number corresponding to mes4 is serial number 4, and the serial number corresponding to mes5 is serial number 5. Then, if the message is sent according to the serial number of the message sending queue Each message in the queue is sent to the designated client in turn, and the sending order of each message in the message sending queue [mes1, mes2, mes3, mes4, mes5] is mes1, mes2, mes3, mes4, and mes5.
其中,第二消息标识为所述指定客户端最近成功接收的消息对应的第一消息标识。作为一种实施方式,该第二消息标识可以是指定客户端所成功接收的所有的消息对应的第一消息标识。例如,指定客户端成功接收到的消息为mes1和mes2,则第二消息标识为mes1和mes2。作为另一种实施方式,该第二信息标识可以是客户端所接收的消息中,部分消息对应的第一消息标识。The second message identifier is the first message identifier corresponding to the message successfully received recently by the designated client. As an implementation manner, the second message identifier may be a first message identifier corresponding to all messages successfully received by the designated client. For example, if it is specified that the messages successfully received by the client are mes1 and mes2, the second message identifiers are mes1 and mes2. As another implementation manner, the second information identifier may be a first message identifier corresponding to a part of the message received by the client.
然后,客户端将第二消息标识发送至服务端,服务端由多个所述第一消息标识查找与所述第二消息标识相同的第一消息标识,作为指定消息标识;由所述消息发送队列内查找与所述指定消息标识对应的序号,作为目标序号;将所述消息发送队列内所述目标序号之后的待推送消息,作为失败消息,将所述失败消息发送至所述指定SDK组件。Then, the client sends the second message identifier to the server, and the server uses the plurality of first message identifiers to search for the first message identifier that is the same as the second message identifier, as the designated message identifier; Look up the sequence number corresponding to the specified message identifier in the queue as the target sequence number; use the message to be pushed after the target sequence number in the message sending queue as a failure message, and send the failure message to the specified SDK component .
假设,消息发送队列[mes1,mes2,mes3,mes4,mes5],服务端依次将mes1,mes2,mes3,mes4,mes5发送至指定客户端,然后,获取指定客户端反馈的第二消息标识为mes1和mes2,则表明mes3、mes4和mes5未成功发送。具体地,将第二消息标识与消息发送队列内的第一消息标识匹配,所确定的指定消息标识为mes1和mes2,则所确定的目标序号为序号2,从而将序号2之后的序号3、4和5对应的mes3、mes4和mes5作为失败消息。Assume that the message sending queue [mes1, mes2, mes3, mes4, mes5], the server sends mes1, mes2, mes3, mes4, mes5 to the specified client in turn, and then obtains the second message identifier returned by the specified client as mes1 And mes2, it indicates that mes3, mes4, and mes5 were not successfully sent. Specifically, the second message identifier is matched with the first message identifier in the message sending queue, and the determined designated message identifiers are mes1 and mes2, and the determined target sequence number is sequence number 2, so that sequence numbers 3 and 3 after sequence number 2 are combined. Mes3, mes4, and mes5 corresponding to 4 and 5 are regarded as failure messages.
作为一种实施方式,多个所述第一消息标识按照所述消息发送队列的序号依次增大,所述第二消息标识为所述指定客户端成功接收的所有消息中最大的第一消息标识。As an implementation manner, a plurality of the first message identifiers are sequentially increased according to the sequence number of the message sending queue, and the second message identifier is the largest first message identifier among all the messages successfully received by the designated client .
具体地,服务端和指定客户端之间可能因为连接的突然断开或者线路的拥堵而导致二者之间的连接断开,使得有一部分数据无法成功发送至指定客户端。因此,可以重新发送该未成功发送至指定客户端的消息。因为,重新发送可以重新建立指定客户端与服务端之间的连接。Specifically, the connection between the server and the designated client may be disconnected due to a sudden disconnection of the connection or congestion of the line, so that some data cannot be successfully sent to the designated client. Therefore, the message that was not successfully sent to the specified client can be resent. Because, resending can re-establish the connection between the specified client and the server.
具体地,消息发送队列的序号依次增大,并且随着序号的逐渐增大,消息标识也逐渐增大,例如,上述的消息发送队列[mes1,mes2,mes3,mes4,mes5],mes1,mes2,mes3,mes4,mes5的第一消息标识依次增大,即mes1最小,mes5最大,然后,指定客户端所成功接收到的消息中最大的第一消息标识记为第二消息标识,例如,指定客户端所成功接收到的消息为mes1,mes2,mes3,则第二消息标识为mes3。Specifically, the sequence numbers of the message sending queues increase sequentially, and as the sequence numbers gradually increase, the message identifiers also gradually increase. For example, the aforementioned message sending queue [mes1, mes2, mes3, mes4, mes5], mes1, mes2 The first message identifiers of, mes3, mes4, and mes5 increase in turn, that is, mes1 is the smallest and mes5 is the largest. Then, the largest first message identifier in the messages successfully received by the client is designated as the second message identifier, for example, specify The messages successfully received by the client are mes1, mes2, and mes3, and the second message identifier is mes3.
指定客户端将该第二消息标识发送至服务端,服务端能够确定在消息发送队列中,与第二消息标识相同的第一消息标识之后的消息未成功发送,即[mes1,mes2,mes3,mes4,mes5]中的mes3之后的消息,也即mes4和mes5为失败消息。The designated client sends the second message identifier to the server, and the server can determine that in the message sending queue, the message after the first message identifier that is the same as the second message identifier is not successfully sent, that is [mes1, mes2, mes3, The messages after mes3 in mes4, mes5], that is, mes4 and mes5 are failure messages.
具体地,考虑到服务端和指定客户端之间因为连接的问题,而导致数据突然无法传输,则可以认为mes3之前的消息成功发送至指定客户端,而mes3之后的消息由于服务端和指定客户端之间的连接故障而无法成功发送。从而,在确定了失败消息之后,例如,确定mes4和mes5未成功发送之后,再次将mes4和mes5发送指定客户端,从而通过再次发送所建立服务端和指定客户端之间的连接,能够有较大概率恢复二者之间的连接,即使二者能够成功连接,并且成功将mes4和mes5发送至指定客户端。Specifically, considering that the data cannot be transmitted suddenly due to the connection problem between the server and the designated client, it can be considered that the message before mes3 is successfully sent to the designated client, and the message after mes3 is due to the server and the designated client. The connection between the terminals is faulty and cannot be sent successfully. Therefore, after the failure message is determined, for example, after it is determined that mes4 and mes5 have not been successfully sent, mes4 and mes5 are sent to the designated client again, so that by sending the connection between the established server and the designated client again, there can be more High probability to restore the connection between the two, even if the two can successfully connect, and successfully send mes4 and mes5 to the designated client.
因此,通过返回的最大消息Id,进行消息的排重,使得所有待推送消息更有可能成功发送至指定客户端。Therefore, by using the returned maximum message Id, the re-weighting of messages is performed, so that all messages to be pushed are more likely to be successfully sent to the specified client.
请参阅图9,其示出了本申请实施例提供的一种消息推送装置900的结构框图,该装置应用于推送系统的服务端,所述推送系统还包括至少一个客户端,具体地,该消息推送装置900可以包括:获取单元901、确定单元902和发送单元903。Please refer to FIG. 9, which shows a structural block diagram of a message push device 900 provided by an embodiment of the present application. The device is applied to the server of a push system. The push system further includes at least one client. Specifically, the The message pushing device 900 may include: an acquiring unit 901, a determining unit 902, and a sending unit 903.
获取单元901,用于获取消息推送请求,所述消息推送请求包括指定客户端标识。The obtaining unit 901 is configured to obtain a message push request, where the message push request includes a designated client identifier.
确定单元902,用于基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件。The determining unit 902 is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, where the designated SDK component is an SDK component corresponding to the designated client.
发送单元903,用于基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。The sending unit 903 is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can be referred to the corresponding process in the foregoing method embodiment, which will not be repeated here.
请参阅图10,其示出了本申请实施例提供的一种消息推送装置1000的结构框图,该装置应用于推送系统的服务端,所述推送系统还包括至少一个客户端,具体地,该消息推送装置1000可以包括:获取单元1001、确定单元1002、发送单元1003和检测单元1004。Please refer to FIG. 10, which shows a structural block diagram of a message pushing device 1000 provided by an embodiment of the present application. The device is applied to the server of a pushing system. The pushing system further includes at least one client. The message pushing device 1000 may include: an acquiring unit 1001, a determining unit 1002, a sending unit 1003, and a detecting unit 1004.
获取单元1001,用于获取消息推送请求,所述消息推送请求包括指定客户端标识。The obtaining unit 1001 is configured to obtain a message push request, where the message push request includes a designated client identifier.
进一步地,服务端包括推送模块和数据库模块,获取单元1001还用于获取所述推送模块发送的所述消息推送请求。Further, the server includes a push module and a database module, and the obtaining unit 1001 is further configured to obtain the message push request sent by the push module.
进一步地,所述服务端还包括接口模块,获取单元1001还用于触发所述接口模块获取所述推送模块发送的消息推送请求,以及触发所述接口模块将所述消息推送请求写入所述数据库模块。Further, the server further includes an interface module, and the acquiring unit 1001 is also configured to trigger the interface module to acquire the message push request sent by the push module, and trigger the interface module to write the message push request into the Database module.
进一步地,获取单元1001还用于触发:所述数据库模块基于所述消息推送请求建立与所述指定客户端标识对应的消息推送任务;所述指定连接器由所述数据库模块中获取所述消息推送任务,基于所述消息推送任务将所述待推送消息发送至所述指定SDK组件。Further, the acquiring unit 1001 is also configured to trigger: the database module establishes a message push task corresponding to the designated client identifier based on the message push request; the designated connector acquires the message from the database module A push task, which sends the message to be pushed to the designated SDK component based on the message push task.
进一步地,获取单元1001还用于触发:指定连接器基于预设时间周期由所述数据库模块中获取所述消息推送任务。Further, the acquiring unit 1001 is further configured to trigger: the designated connector acquires the message push task from the database module based on a preset time period.
所述推送模块为使用应用消息推送组件的客户端。所述应用消息推送组件为APP PUSH组件。所述接口模块为HTTP API。The push module is a client terminal that uses the application message push component. The application message pushing component is an APP PUSH component. The interface module is HTTP API.
进一步地,获取单元1001还用于触发所述接口模块获取其他服务端发送的同步请求,所述同步请求包括指定消息的描述内容;若所述指定消息的描述内容与所述待推送消息的描述内容一致,则所述接口模块将所述待推送消息发送至所述其他服务端的接口模块。Further, the acquiring unit 1001 is also configured to trigger the interface module to acquire a synchronization request sent by another server, the synchronization request includes the description content of the specified message; if the description content of the specified message is the same as the description of the message to be pushed If the content is consistent, the interface module sends the message to be pushed to the interface module of the other server.
确定单元1002,用于基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件。The determining unit 1002 is configured to determine a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client.
发送单元1003,用于基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。The sending unit 1003 is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
进一步地,发送单元1003还用于根据预设发送顺序确定多个所述待推送消息对应的消息发送队列;基于所述指定连接器根据所述消息发送队列依次将多个所述待推送消息发送至所述指定SDK组件。Further, the sending unit 1003 is further configured to determine the message sending queues corresponding to the multiple messages to be pushed according to a preset sending order; and send the multiple messages to be pushed in sequence according to the message sending queue based on the designated connector To the specified SDK component.
进一步地,发送单元1003还用于确定未成功发送至所述指定客户端的待推送消息,作为失败消息;将所述失败消息发送至所述指定SDK组件。Further, the sending unit 1003 is further configured to determine a message to be pushed that is not successfully sent to the designated client as a failure message; and send the failure message to the designated SDK component.
进一步地,每个所述待推送消息对应一所述第一消息标识,且多个所述第一消息标识与所述消息发送队列内的序号一一对应,所述第二消息标识为所述指定客户端最近成功接收的消息对应的第一消息标识,发送单元1003还用于由多个所述第一消息标识查找与所述第二消息标识相同的第一消息标识,作为指定消息标识;由所述消息发送队列内查找与所述指定消息标识对应的序号,作为目标序号;将所述消息发送队列内所述目标序号之后的待推送消息,作为失败消息。Further, each of the messages to be pushed corresponds to the first message identifier, and a plurality of the first message identifiers correspond to the sequence numbers in the message sending queue in a one-to-one correspondence, and the second message identifier is the Specify the first message identifier corresponding to the message successfully received by the client recently, and the sending unit 1003 is further configured to search for a first message identifier that is the same as the second message identifier from a plurality of the first message identifiers as the designated message identifier; The sequence number corresponding to the specified message identifier is searched in the message sending queue as the target sequence number; the message to be pushed after the target sequence number in the message sending queue is regarded as the failure message.
其中,多个所述第一消息标识按照所述消息发送队列的序号依次增大,所述第二消息标识为所述指定客户端成功接收的所有消息中最大的第一消息标识。Wherein, the plurality of first message identifiers increase sequentially according to the sequence number of the message sending queue, and the second message identifier is the largest first message identifier among all the messages successfully received by the designated client.
检测单元1004,用于检测所述指定客户端的消息推送结果;若所述消息推送结果为未成功接收消息,则再次将所述待推送消息发送至所述指定客户端。The detection unit 1004 is configured to detect the message push result of the designated client; if the message push result is that the message is not successfully received, the message to be pushed is sent to the designated client again.
进一步地,检测单元1004还用于检测是否接收到所述指定客户端反馈的同步成功接收消息的指示信息;若成功接收到,则判定所述消息推送结果为成功接收消息;若未成功接收到,则判定所述消息推送结果为未成功接收消息。Further, the detection unit 1004 is also used to detect whether the indication information of the synchronization successful reception message fed back by the designated client is received; if it is successfully received, it is determined that the message push result is a successful reception message; if it is not successfully received , It is determined that the message push result is that the message is not successfully received.
进一步地,检测单元1004还用于获取所述服务端向所述指定客户端发送的消息对应的第一消息标识;获取所述指定客户端反馈的第二消息标识,所述第二消息标识为所述指定客户端成功接收的消息对应的第一消息标识;根据所述第一消息标识和所述第二消息标识确定所述指定客户端的消息推送结果。Further, the detection unit 1004 is further configured to obtain the first message identifier corresponding to the message sent by the server to the designated client; and obtain the second message identifier fed back by the designated client, where the second message identifier is The first message identifier corresponding to the message successfully received by the designated client; and the message push result of the designated client is determined according to the first message identifier and the second message identifier.
进一步地,检测单元1004还用于判断所述第一消息标识和所述第二消息标识是否匹配;如果匹配,则判定所述消息推送结果为成功接收消息;如果不匹配,则判定所述消息推送结果为未成功接收消息。Further, the detection unit 1004 is also used to determine whether the first message identifier and the second message identifier match; if they match, determine that the message push result is a successful reception of the message; if they do not match, determine the message The push result is that the message was not successfully received.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述装置和模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of the description, the specific working process of the device and module described above can be referred to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的几个实施例中,模块相互之间的耦合可以是电性,机械或其它形式的耦合。In the several embodiments provided in this application, the coupling between the modules may be electrical, mechanical or other forms of coupling.
另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or software function modules.
请参考图11,其示出了本申请实施例提供的一种电子设备的结构框图。该电子设备100可以是智能手机、平板电脑、电子书等能够运行应用程序的电子设备。本申请中的电子设备100可以是上述的服务端。具体地,电子设备100可以包括一个或多个如下部件:处理器110、存储器120、以及一个或多个应用程序,其中一个或多个应用程序可以被存储在存储器120中并被配置为由一个或多个处理器110执行,一个或多个程序配置用于执行如前述方法实施例所描述的方法。Please refer to FIG. 11, which shows a structural block diagram of an electronic device provided by an embodiment of the present application. The electronic device 100 may be an electronic device capable of running application programs, such as a smart phone, a tablet computer, or an e-book. The electronic device 100 in this application may be the aforementioned server. Specifically, the electronic device 100 may include one or more of the following components: a processor 110, a memory 120, and one or more application programs, where one or more application programs may be stored in the memory 120 and configured to be operated by one Or multiple processors 110 execute, and one or more programs are configured to execute the method described in the foregoing method embodiment.
处理器110可以包括一个或者多个处理核。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。可选地,处理器110可以采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器110可 集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。可以理解的是,上述调制解调器也可以不集成到处理器110中,单独通过一块通信芯片进行实现。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Various functions and processing data of the electronic device 100. Optionally, the processor 110 may adopt at least one of digital signal processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A kind of hardware form to realize. The processor 110 may integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs, etc.; the GPU is used for rendering and drawing of display content; the modem is used for processing wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented by a communication chip alone.
存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (RAM) or read-only memory (Read-Only Memory). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, where the program storage area may store instructions for implementing the operating system and instructions for implementing at least one function (such as touch function, sound playback function, image playback function, etc.) , Instructions for implementing the following various method embodiments, etc. The storage data area can also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.
请参考图12,其示出了本申请实施例提供的一种计算机可读存储介质的结构框图。该计算机可读介质1200中存储有程序代码,所述程序代码可被处理器调用执行上述方法实施例中所描述的方法。Please refer to FIG. 12, which shows a structural block diagram of a computer-readable storage medium provided by an embodiment of the present application. The computer-readable medium 1200 stores program code, and the program code can be invoked by a processor to execute the method described in the foregoing method embodiment.
计算机可读存储介质1200可以是诸如闪存、EEPROM(电可擦除可编程只读存储器)、EPROM、硬盘或者ROM之类的电子存储器。可选地,计算机可读存储介质1200包括非易失性计算机可读介质(non-transitory computer-readable storage medium)。计算机可读存储介质1200具有执行上述方法中的任何方法步骤的程序代码1210的存储空间。这些程序代码可以从一个或者多个计算机程序产品中读出或者写入到这一个或者多个计算机程序产品中。程序代码1210可以例如以适当形式进行压缩。The computer-readable storage medium 1200 may be an electronic memory such as flash memory, EEPROM (Electrically Erasable Programmable Read Only Memory), EPROM, hard disk, or ROM. Optionally, the computer-readable storage medium 1200 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1200 has storage space for the program code 1210 for executing any method steps in the above-mentioned methods. These program codes can be read from or written into one or more computer program products. The program code 1210 may be compressed in a suitable form, for example.
最后应说明的是:以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不驱使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: The technical solutions recorded in the foregoing embodiments are modified, or some of the technical features are equivalently replaced; these modifications or replacements do not drive the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims (20)
- 一种消息推送方法,其特征在于,应用于推送系统的服务端,所述推送系统还包括至少一个客户端,所述方法包括:A message push method, characterized in that it is applied to a server of a push system, the push system further includes at least one client, and the method includes:获取消息推送请求,所述消息推送请求包括指定客户端标识;Acquiring a message push request, where the message push request includes a designated client identifier;基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件;Determining a designated connector based on the designated client identifier, and the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client;基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。Send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- 根据权利要求1所述的方法,其特征在于,所述服务端包括推送模块和数据库模块,所述获取消息推送请求,包括:The method according to claim 1, wherein the server includes a push module and a database module, and the acquiring message push request includes:获取所述推送模块发送的所述消息推送请求。Obtain the message push request sent by the push module.
- 根据权利要求2所述的方法,其特征在于,所述服务端还包括接口模块;所述获取所述推送模块发送的所述消息推送请求,包括:The method according to claim 2, wherein the server further comprises an interface module; and said obtaining the message push request sent by the push module comprises:所述接口模块获取所述推送模块发送的消息推送请求;The interface module obtains the message push request sent by the push module;所述接口模块将所述消息推送请求写入所述数据库模块。The interface module writes the message push request into the database module.
- 根据权利要求3所述的方法,其特征在于,所述基于所述指定连接器将待推送消息发送至所述指定SDK组件,包括:The method according to claim 3, wherein the sending a message to be pushed to the designated SDK component based on the designated connector comprises:所述数据库模块基于所述消息推送请求建立与所述指定客户端标识对应的消息推送任务;The database module establishes a message push task corresponding to the designated client identifier based on the message push request;所述指定连接器由所述数据库模块中获取所述消息推送任务,基于所述消息推送任务将所述待推送消息发送至所述指定SDK组件。The designated connector obtains the message push task from the database module, and sends the message to be pushed to the designated SDK component based on the message push task.
- 根据权利要求4所述的方法,其特征在于,所述指定连接器由所述数据库模块中获取所述消息推送任务,包括:The method according to claim 4, wherein the designated connector obtains the message push task from the database module, comprising:所述指定连接器基于预设时间周期由所述数据库模块中获取所述消息推送任务。The designated connector obtains the message push task from the database module based on a preset time period.
- 根据权利要求2所述的方法,其特征在于,所述推送模块为应用消息推送组件。The method according to claim 2, wherein the push module is an application message push component.
- 根据权利要求6所述的方法,其特征在于,所述应用消息推送组件为APP PUSH组件。The method according to claim 6, wherein the application message pushing component is an APP PUSH component.
- 根据权利要求3所述的方法,其特征在于,所述接口模块为HTTP API。The method according to claim 3, wherein the interface module is HTTP API.
- 根据权利要求3所述的方法,其特征在于,所述消息推送请求包括待推送消息的描述内容,所述方法还包括:The method according to claim 3, wherein the message push request includes description content of the message to be pushed, and the method further comprises:所述接口模块获取其他服务端发送的同步请求,所述同步请求包括指定消息的描述内容;The interface module obtains a synchronization request sent by another server, where the synchronization request includes the description content of the specified message;若所述指定消息的描述内容与所述待推送消息的描述内容一致,则所述接口模块将所述待推送消息发送至所述其他服务端的接口模块。If the description content of the designated message is consistent with the description content of the message to be pushed, the interface module sends the message to be pushed to the interface module of the other server.
- 根据权利要求1所述的方法,其特征在于,所述基于所述指定连接器将待推送消息发送至所述指定SDK组件之后,还包括:The method according to claim 1, wherein after the sending a message to be pushed to the designated SDK component based on the designated connector, the method further comprises:检测所述指定客户端的消息推送结果;Detecting the message push result of the designated client;若所述消息推送结果为未成功接收消息,则再次将所述待推送消息发送至所述指定客户端。If the result of the message push is that the message is not successfully received, the message to be pushed is sent to the designated client again.
- 根据权利要求10所述的方法,其特征在于,所述检测所述指定客户端的消息推送结果,包括:The method according to claim 10, wherein said detecting a message push result of said designated client terminal comprises:检测是否接收到所述指定客户端反馈的同步成功接收消息的指示信息;Detecting whether the indication information of the synchronization successful reception message fed back by the designated client is received;若成功接收到,则判定所述消息推送结果为成功接收消息;If it is successfully received, it is determined that the message push result is a successfully received message;若未成功接收到,则判定所述消息推送结果为未成功接收消息。If it is not successfully received, it is determined that the message push result is that the message is not successfully received.
- 根据权利要求10所述的方法,其特征在于,所述检测所述指定客户端的消息推送结果,包括:The method according to claim 10, wherein said detecting a message push result of said designated client terminal comprises:获取所述服务端向所述指定客户端发送的消息对应的第一消息标识;Acquiring the first message identifier corresponding to the message sent by the server to the designated client;获取所述指定客户端反馈的第二消息标识,所述第二消息标识为所述指定客户端成功接收的消息对应的第一消息标识;Acquiring a second message identifier fed back by the designated client, where the second message identifier is a first message identifier corresponding to a message successfully received by the designated client;根据所述第一消息标识和所述第二消息标识确定所述指定客户端的消息推送结果。Determine the message push result of the designated client according to the first message identifier and the second message identifier.
- 根据权利要求12所述的方法,其特征在于,所述根据所述第一消息标识和所述第二消息标识确定所述指定客户端的消息推送结果,包括:The method according to claim 12, wherein the determining the message push result of the designated client according to the first message identifier and the second message identifier comprises:判断所述第一消息标识和所述第二消息标识是否匹配;Judging whether the first message identifier and the second message identifier match;如果匹配,则判定所述消息推送结果为成功接收消息;If it matches, it is determined that the message push result is a successful message reception;如果不匹配,则判定所述消息推送结果为未成功接收消息。If there is no match, it is determined that the message push result is that the message is not successfully received.
- 根据权利要求1所述的方法,其特征在于,所述待推送信息为多个,所述基于所述指定连接器将待推送消息发送至所述指定SDK组件,包括:The method according to claim 1, wherein there are multiple pieces of information to be pushed, and the sending the message to be pushed to the designated SDK component based on the designated connector comprises:根据预设发送顺序确定多个所述待推送消息对应的消息发送队列;Determining a plurality of message sending queues corresponding to the messages to be pushed according to a preset sending order;基于所述指定连接器根据所述消息发送队列依次将多个所述待推送消息发送至所述指定SDK组件。Based on the designated connector, sequentially send a plurality of the messages to be pushed to the designated SDK component according to the message sending queue.
- 根据权利要求14所述的方法,其特征在于,所述基于所述指定连接器根据所述消息发送队列依次将多个所述待推送消息发送至所述指定SDK组件之后,包括:The method according to claim 14, wherein the step of sending, based on the designated connector, the plurality of messages to be pushed to the designated SDK component in turn according to the message sending queue comprises:确定未成功发送至所述指定客户端的待推送消息,作为失败消息;It is determined that a message to be pushed that is not successfully sent to the designated client is regarded as a failure message;将所述失败消息发送至所述指定SDK组件。Send the failure message to the designated SDK component.
- 根据权利要求15所述的方法,其特征在于,每个所述待推送消息对应一所述第一消息标识,且多个所述第一消息标识与所述消息发送队列内的序号一一对应,所述第二消息标识为所述指定客户端最近成功接收的消息对应的第一消息标识,所述确定未成功发送至所述指定客户端的待推送消息,作为失败消息,包括:The method according to claim 15, wherein each of the messages to be pushed corresponds to one of the first message identifiers, and a plurality of the first message identifiers corresponds to a sequence number in the message sending queue one-to-one The second message identifier is the first message identifier corresponding to the message successfully received recently by the designated client, and the message to be pushed that is determined to be unsuccessfully sent to the designated client, as a failure message, includes:由多个所述第一消息标识查找与所述第二消息标识相同的第一消息标识,作为指定消息标识;Searching for a first message identifier that is the same as the second message identifier from a plurality of the first message identifiers as the designated message identifier;由所述消息发送队列内查找与所述指定消息标识对应的序号,作为目标序号;Searching for the sequence number corresponding to the specified message identifier in the message sending queue as the target sequence number;将所述消息发送队列内所述目标序号之后的待推送消息,作为失败消息。The message to be pushed after the target sequence number in the message sending queue is regarded as a failure message.
- 根据权利要求16所述的方法,其特征在于,多个所述第一消息标识按照所述消息发送队列的序号依次增大,所述第二消息标识为所述指定客户端成功接收的所有消息中最大的第一消息标识。The method according to claim 16, wherein a plurality of the first message identifiers are sequentially increased according to the sequence number of the message sending queue, and the second message identifiers are all messages successfully received by the designated client The largest first message identifier in.
- 一种消息推送装置,其特征在于,应用于推送系统的服务端,所述推送系统还包括至少一个客户端,所述消息推送装置包括:A message pushing device, which is characterized in that it is applied to a server of a pushing system, the pushing system further includes at least one client, and the message pushing device includes:获取单元,用于获取消息推送请求,所述消息推送请求包括指定客户端标识;An obtaining unit, configured to obtain a message push request, where the message push request includes a designated client identifier;确定单元,用于基于所述指定客户端标识确定指定连接器,所述指定连接器与指定SDK组件连接,其中,所述指定SDK组件为所述指定客户端对应的SDK组件;A determining unit, configured to determine a designated connector based on the designated client identifier, where the designated connector is connected to a designated SDK component, wherein the designated SDK component is an SDK component corresponding to the designated client;发送单元,用于基于所述指定连接器将待推送消息发送至所述指定SDK组件,以使所述指定SDK组件将所述待推送消息发送至所述指定客户端。The sending unit is configured to send the message to be pushed to the designated SDK component based on the designated connector, so that the designated SDK component sends the message to be pushed to the designated client.
- 一种电子设备,其特征在于,包括:An electronic device, characterized in that it comprises:一个或多个处理器;One or more processors;存储器;Memory一个或多个应用程序,其中所述一个或多个应用程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个应用程序配置用于执行如权利 要求1-17任一项所述的方法。One or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, and the one or more application programs are configured to execute The method of any one of claims 1-17.
- 一种计算机可读介质,其特征在于,所述计算机可读介质存储有处理器可执行的程序代码,所述程序代码被所述处理器执行时使所述处理器执行权利要求1-17任一项所述方法。A computer-readable medium, wherein the computer-readable medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes any of claims 1-17. One of the methods described.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/092206 WO2021237433A1 (en) | 2020-05-26 | 2020-05-26 | Message pushing method and apparatus, and electronic device and computer-readable medium |
CN202080094837.0A CN115004673B (en) | 2020-05-26 | 2020-05-26 | Message pushing method, device, electronic equipment and computer readable medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/092206 WO2021237433A1 (en) | 2020-05-26 | 2020-05-26 | Message pushing method and apparatus, and electronic device and computer-readable medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021237433A1 true WO2021237433A1 (en) | 2021-12-02 |
Family
ID=78745187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/092206 WO2021237433A1 (en) | 2020-05-26 | 2020-05-26 | Message pushing method and apparatus, and electronic device and computer-readable medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN115004673B (en) |
WO (1) | WO2021237433A1 (en) |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114329293A (en) * | 2021-12-23 | 2022-04-12 | 上海淇玥信息技术有限公司 | Message pushing method and device and electronic equipment |
CN114374697A (en) * | 2022-01-14 | 2022-04-19 | 瀚云科技有限公司 | System and method for pushing road vehicle passing information, electronic equipment and storage medium |
CN114553947A (en) * | 2022-01-29 | 2022-05-27 | 北京金堤科技有限公司 | Method and device for processing message |
CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
CN114979238A (en) * | 2022-05-24 | 2022-08-30 | 浪潮软件集团有限公司 | Multi-client data real-time pushing method and system |
CN115454671A (en) * | 2022-09-07 | 2022-12-09 | 中国建设银行股份有限公司 | Message processing method, device, equipment and storage medium |
CN115801891A (en) * | 2022-11-08 | 2023-03-14 | 北京沃东天骏信息技术有限公司 | Request processing method and device |
CN117176793A (en) * | 2023-08-31 | 2023-12-05 | 广州市玄武无线科技股份有限公司 | Automatic forwarding method, system, device, equipment and medium for uplink message |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116055554B (en) * | 2023-02-06 | 2024-05-31 | 国电南京自动化股份有限公司 | Notification engine based on message mechanism and applied to digital service |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109525647A (en) * | 2018-10-25 | 2019-03-26 | 平安科技(深圳)有限公司 | Message pushes badge value control method, electronic device and storage medium |
CN109922101A (en) * | 2017-12-12 | 2019-06-21 | 北京奇虎科技有限公司 | A kind of method, apparatus and server for realizing specific transactions in the terminal |
CN110351245A (en) * | 2019-06-12 | 2019-10-18 | 深圳市奥克多普科技有限公司 | The generation method and PUSH message system of APP PUSH message SDK packet |
CN111052168A (en) * | 2017-04-10 | 2020-04-21 | 博德艾克帝弗公司 | Platform for location and time based advertising |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105915612A (en) * | 2016-04-19 | 2016-08-31 | 北京金山安全软件有限公司 | Push message acquisition method, message push method and device |
CN108063724A (en) * | 2018-01-12 | 2018-05-22 | 吉浦斯信息咨询(深圳)有限公司 | Information push method and its system based on Android platform |
-
2020
- 2020-05-26 WO PCT/CN2020/092206 patent/WO2021237433A1/en active Application Filing
- 2020-05-26 CN CN202080094837.0A patent/CN115004673B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111052168A (en) * | 2017-04-10 | 2020-04-21 | 博德艾克帝弗公司 | Platform for location and time based advertising |
CN109922101A (en) * | 2017-12-12 | 2019-06-21 | 北京奇虎科技有限公司 | A kind of method, apparatus and server for realizing specific transactions in the terminal |
CN109525647A (en) * | 2018-10-25 | 2019-03-26 | 平安科技(深圳)有限公司 | Message pushes badge value control method, electronic device and storage medium |
CN110351245A (en) * | 2019-06-12 | 2019-10-18 | 深圳市奥克多普科技有限公司 | The generation method and PUSH message system of APP PUSH message SDK packet |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114329293A (en) * | 2021-12-23 | 2022-04-12 | 上海淇玥信息技术有限公司 | Message pushing method and device and electronic equipment |
CN114374697A (en) * | 2022-01-14 | 2022-04-19 | 瀚云科技有限公司 | System and method for pushing road vehicle passing information, electronic equipment and storage medium |
CN114374697B (en) * | 2022-01-14 | 2024-03-01 | 瀚云科技有限公司 | Road passing information pushing system, method, electronic equipment and storage medium |
CN114553947A (en) * | 2022-01-29 | 2022-05-27 | 北京金堤科技有限公司 | Method and device for processing message |
CN114553947B (en) * | 2022-01-29 | 2024-01-19 | 北京金堤科技有限公司 | Method and device for processing message |
CN114915652A (en) * | 2022-03-30 | 2022-08-16 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
CN114915652B (en) * | 2022-03-30 | 2024-03-15 | 北京奇艺世纪科技有限公司 | Message pushing method and device, electronic equipment and storage medium |
CN114979238A (en) * | 2022-05-24 | 2022-08-30 | 浪潮软件集团有限公司 | Multi-client data real-time pushing method and system |
CN115454671A (en) * | 2022-09-07 | 2022-12-09 | 中国建设银行股份有限公司 | Message processing method, device, equipment and storage medium |
CN115801891A (en) * | 2022-11-08 | 2023-03-14 | 北京沃东天骏信息技术有限公司 | Request processing method and device |
CN117176793A (en) * | 2023-08-31 | 2023-12-05 | 广州市玄武无线科技股份有限公司 | Automatic forwarding method, system, device, equipment and medium for uplink message |
Also Published As
Publication number | Publication date |
---|---|
CN115004673B (en) | 2024-04-16 |
CN115004673A (en) | 2022-09-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021237433A1 (en) | Message pushing method and apparatus, and electronic device and computer-readable medium | |
US10244066B2 (en) | Push notification delivery system | |
CN108696374B (en) | Method and device for updating client configuration | |
US9578081B2 (en) | System and method for providing an actively invalidated client-side network resource cache | |
CN109474688B (en) | Method, device, equipment and medium for sending instant communication network request message | |
CN108833950B (en) | Barrage message issuing method, server, system and storage medium | |
US9686506B2 (en) | Method, apparatus, system, and storage medium for video call and video call control | |
WO2014183427A1 (en) | Method and apparatus for displaying webcast rooms | |
WO2017174026A1 (en) | Client connection method and system | |
CN111541555A (en) | Group chat optimization method and related product | |
WO2017185615A1 (en) | Method for determining service status of service processing device and scheduling device | |
US9559995B1 (en) | System and method for broadcasting contents from web-based browser to a recipient device using extensible messaging and presence protocol (XMPP) | |
US20230087220A1 (en) | Data processing method and apparatus based on instant messaging, device, and storage medium | |
CN108243222A (en) | Server network architecture method and device | |
WO2021226781A1 (en) | Firewall rule updating method and apparatus, server, and storage medium | |
CN112346751A (en) | Application program installation method and device, electronic equipment and storage medium | |
CN106411713B (en) | State notification method and server | |
CN109788251B (en) | Video processing method, device and storage medium | |
CN110798495B (en) | Method and server for end-to-end message push in cluster architecture mode | |
CN112751689A (en) | Network connectivity detection method, monitoring server and monitoring agent device | |
CN113542324B (en) | Message pushing method and device | |
WO2016037489A1 (en) | Method, device and system for monitoring rcs spam messages | |
CN114884805A (en) | Data transmission method, device, terminal and storage medium | |
CN105681262A (en) | Interaction message allocating method and system | |
CN114268799A (en) | Streaming media transmission method and device, electronic equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20938022 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 A DATED 11.05.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20938022 Country of ref document: EP Kind code of ref document: A1 |