CN112235184B - Event-driven information pushing method and device and electronic equipment - Google Patents

Event-driven information pushing method and device and electronic equipment Download PDF

Info

Publication number
CN112235184B
CN112235184B CN202010932543.2A CN202010932543A CN112235184B CN 112235184 B CN112235184 B CN 112235184B CN 202010932543 A CN202010932543 A CN 202010932543A CN 112235184 B CN112235184 B CN 112235184B
Authority
CN
China
Prior art keywords
point location
client
target point
information
server
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010932543.2A
Other languages
Chinese (zh)
Other versions
CN112235184A (en
Inventor
章红春
白璐
张雄健
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shougang Automation Information Technology Co Ltd
Original Assignee
Beijing Shougang Automation Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shougang Automation Information Technology Co Ltd filed Critical Beijing Shougang Automation Information Technology Co Ltd
Priority to CN202010932543.2A priority Critical patent/CN112235184B/en
Publication of CN112235184A publication Critical patent/CN112235184A/en
Application granted granted Critical
Publication of CN112235184B publication Critical patent/CN112235184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/21Monitoring or handling of messages
    • H04L51/214Monitoring or handling of messages using selective forwarding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/52Network services specially adapted for the location of the user terminal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services

Landscapes

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

Abstract

The invention discloses an event-driven information pushing method, an event-driven information pushing device and electronic equipment, wherein the method is applied to a server, the server is connected with a client, point location information subscribed from the client to the server is stored in the server, and the method comprises the following steps: monitoring the point location value of the point location information, and acquiring a client which corresponds to the point location information and is connected with the server when the point location value corresponding to the point location information changes; and sending the point location information after the change to a corresponding client. The method and the system for pushing the point location information of the client side have the advantages that the condition that the pushed information is frequently updated is considered, the server is always connected with the client side, the server can send the information at any time, the pushing is more timely, in addition, the point location information subscribed by the client side is only pushed to the client side, the small and accurate information pushing can be realized, and the technical problems of large data size, untimely pushing and inaccurate information pushing in the prior art are solved.

Description

Event-driven information pushing method and device and electronic equipment
Technical Field
The invention relates to the technical field of information pushing, in particular to an event-driven information pushing method and device and electronic equipment.
Background
Today, most websites and even mobile phone APP provide information pushing functions, such as hot news recommendation of news clients, chat information reminding of IM tools, E-commerce product promotion information, notification and approval processes of enterprise applications and the like. The push plays an important role in improving the activity of products, the utilization rate of functional modules, the viscosity of users and the retention rate of users, and is used as a key channel in website operation, and the realization of a target can be effectively promoted by reasonably applying the information push.
However, the prior art has the technical problems of large data size, untimely pushing and inaccuracy in information pushing.
Disclosure of Invention
The embodiment of the application provides an event-driven information pushing method, an event-driven information pushing device and electronic equipment, and solves the technical problems that the information pushing data volume is large, and the pushing is not timely and accurate in the prior art.
In a first aspect, the present application provides the following technical solutions through an embodiment of the present application:
an event-driven information pushing method is applied to a server, the server is used for managing point location information of preset point locations, and the method comprises the following steps: the method comprises the steps of obtaining a first request from a client, wherein the first request comprises a unique identification code of the client, and the first request is used for requesting the first connection between the client and a server; verifying the unique identification code, and keeping connection with the client after the unique identification code passes verification; acquiring a second request from the client, wherein the second request comprises a target point subscribed to the server by the client, and the target point is one of the preset point; storing the mapping relation between the target point location and the client; monitoring point location information of the target point location, and acquiring the client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes; and sending the point location information of the changed target point location to the client corresponding to the target point location.
In one embodiment, the server stores the mapping relationship between the target point location and the client subscribing to the target point location in a mapping relationship table; the obtaining of the client corresponding to the target point and maintaining connection with the server includes: and acquiring the client associated with the target point bit from the mapping relation stored in the mapping relation table.
In one embodiment, the unique identification code comprises: the system time, the target IP address or the source IP address of the client, the HashCode value of the client and the random number generated based on a preset random number generation algorithm.
In an embodiment, before the sending the point location information of the changed target point location to the client corresponding to the target point location, the method further includes: carrying out information fixed length processing, information tail segmentation processing and information head adding on the changed point location information of the target point location to obtain the processed point location information of the target point location; and sending the processed point location information of the target point location to the client corresponding to the target point location.
In one embodiment, the header comprises: and the current version number and the information length of the point location information of the target point location.
In an embodiment, before sending the point location information of the processed target point location to the client corresponding to the target point location, the method further includes: receiving a third request of the client, wherein the third request comprises the network environment condition of the client; and when the client is in a weak network environment, sending the point location information of the processed target point location to the client corresponding to the target point location by using a binary protocol.
In a second aspect, the present application provides the following technical solutions according to an embodiment of the present application:
an event-driven information pushing device is applied to a server, the server is used for managing point location information of preset point locations, and the device comprises: a first obtaining unit, configured to obtain a first request from a client, where the first request includes a unique identifier of the client, and the first request is used to request a first connection between the client and the server; the verification unit is used for verifying the unique identification code and keeping connection with the client after the unique identification code passes verification; a second obtaining unit, configured to obtain a second request from the client, where the second request includes a target point subscribed to the server by the client, and the target point is one of the preset point locations; the storage unit is used for storing the mapping relation between the target point location and the client; the monitoring unit is used for monitoring the point location information of the target point location, and acquiring the client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes; and the sending unit is used for sending the point location information of the changed target point location to the client corresponding to the target point location.
In a third aspect, the present application provides the following technical solutions through an embodiment of the present application:
an electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor when executing the program may perform the method steps as described in any of the embodiments above.
In a fourth aspect, the present application provides the following technical solutions according to an embodiment of the present application:
a computer-readable storage medium having stored thereon a computer program comprising: which when executed by a processor may carry out the method steps as described in any of the embodiments above.
One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages:
in the event-driven information pushing method, the server and the client which passes verification are always connected, when the target point location subscribed to the server by the connected client is received, the mapping relation between the target point location and the client which subscribes the target point location is stored, then the point location information of the target point location subscribed by each client which keeps connection is continuously monitored, when the point location information of the target point location changes, the client corresponding to the target point location is obtained, and the changed point location information of the target point location is actively pushed to the client.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of an event-driven information push method according to an embodiment of the present application;
FIG. 2 is an architecture diagram of an event-driven information pushing apparatus according to an embodiment of the present application;
fig. 3 is an architecture diagram of an electronic device according to a third embodiment of the present application;
fig. 4 is an architecture diagram of a computer-readable storage medium according to a fourth embodiment of the present application.
Detailed Description
The embodiment of the application provides an event-driven information pushing method, an event-driven information pushing device and electronic equipment, and solves the technical problems that the information pushing data volume is large, and the pushing is not timely and accurate in the prior art.
In order to solve the technical problems, the general idea of the embodiment of the application is as follows:
in the event-driven-based information pushing method, a server and a client which passes verification are always connected, when a target point location subscribed to the server by the connected client is received, the mapping relation between the target point location and the client which subscribes the target point location is stored, then point location information of the target point location subscribed by each client which keeps the connection is continuously monitored, when the point location information of the target point location changes, the client corresponding to the target point location is obtained, and the point location information of the changed target point location is actively pushed to the client.
In order to better understand the technical solution, the technical solution will be described in detail with reference to the drawings and the specific embodiments.
Example one
As shown in fig. 1, this embodiment provides an event-driven information pushing method, which is applied to a server, where the server is configured to manage point location information of preset points, and in a specific application, the server is configured to centrally manage status information of lights distributed at various positions in a venue, where each preset point is a light distributed at each position, and the point location information is status information of lights, for example: switching information, power information, etc. The server is connected with a field controller in the venue to acquire the state information of the lamps at each position.
The method is implemented according to the following steps:
step S101: the method comprises the steps of obtaining a first request from a client, wherein the first request comprises a unique identification code of the client, and the first request is used for requesting first connection between the client and a server.
In a specific application, the client is a manager in the venue, and any manager can join the server by sending the first request to remotely monitor the venue.
As an alternative embodiment, the unique identification code comprises: the system time, the source IP address or the target IP address (the IP address of the requested server) where the client is located, the HashCode value of the client and the random number generated based on the preset random number generation algorithm.
In specific application, the unique identification code is defined as a main key of a character string and is composed of 32-bit numbers, the code adopts a 16-system code, and completely unique system information in time and space is defined as follows:
the 1-8 bits adopt system time, the system time is accurate to millisecond level, and the uniqueness of the time is ensured;
the 9-16 bits adopt the source IP address or the target IP address where the client is positioned, so that the uniqueness in the server cluster or the client is ensured;
the positions 17 to 24 adopt the HashCode value of the client, and the uniqueness is realized on an internal object;
the 25-32 bits generate a random number by calling a preset random number generation algorithm, and the uniqueness is in an object at millisecond level.
The unique identification code constructed from multiple dimensions can avoid the mutual conflict of one-time coding between the clients, and can avoid the problem that the name is time-consuming in the subsequent storage of the clients in the storage server. For distributed applications under big data, the limitation of unique identification codes on the expansion capability of the application can be avoided.
Step S102: and verifying the unique identification code, and keeping the connection with the client after the unique identification code passes the verification.
The method specifically comprises the following steps: verifying whether the format of the unique identification code is correct or not, if the format of the unique identification code passes the verification, establishing connection with the client, and sending a success message to the client, and if the format of the unique identification code does not pass the verification, sending a failure message to the client, wherein specifically, the success message comprises a code and msg, the code is 1000, and the msg indicates that the connection is successful; the failure message contains code of 1002 and msg of connection failure.
After the connection with the client is successfully established, the client is always connected, and then the client is waited to send a second request to the server, wherein the second request is used for the client to subscribe the target point location to the server, namely, the target point location is a lamp distributed at one or more of the positions, and in practical application, the subscription of the target point location can be divided into two types: one-time subscription and long-term subscription. The one-time subscription message can acquire one push opportunity after the user clicks subscription; the long-term subscription message can continuously trigger messages for the user after the user clicks the button.
It should be noted that the target point of the subscription may be a point that the user subscribes on the client, or may be a point that the user does not actively subscribe, but the client is converted into a type or rule-based subscription by the background application by collecting various behavior patterns of the user.
Step S103: and when the client sends the second request to the server, acquiring the second request from the client.
Step S104: and associating the target point bit carried by the second request with the client side sending the second request, and storing the mapping relation of the target point bit and the client side into a mapping relation table.
Further, the mapping relation table is stored in a memory database, and the memory database is a database tool with a memory as a main storage medium. Because the read-write speed of the memory is very fast, the memory database has the biggest characteristics of good performance and high speed. However, since the memory is a scarce resource in the system, the capacity of the memory database is limited by the physical memory, and therefore, the data managed in the memory database usually only has hot spots or high-frequency data (but not all data), such as the mapping relationship in the present application. The problem of security can be said to be the biggest brute force of the memory database because the memory itself has the natural defect of power loss. Therefore, when using the in-memory database, it is usually necessary to adopt some protection mechanisms in advance for the data on the in-memory, such as backup, log recording, hot standby or cluster, and synchronization with the disk database.
Step S105: and monitoring the point location information of the target point location, and acquiring a client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes.
In specific application, the server needs to monitor point location information of each target point location in the mapping relation table, the server monitors the point location information of the target point location by using the event driver, and when the point location information of the target point location changes, the client corresponding to the target point location and connected with the server is obtained from the mapping table relation stored in the mapping relation table.
The process that the server judges whether the point location information of the monitoring target point location changes can be as follows:
and maintaining the version number of the point location information of the current target point location of one client in the database, monitoring the version number of the latest target point location information, updating the version number simultaneously with the point location information, and determining the point location information change of the target point location when the version number changes.
Of course, in other embodiments, the point location information of the target point location may also be directly compared to determine whether the point location information of the target point location changes.
Step S106: and sending the point location information of the changed target point to a corresponding client.
In this embodiment, point location information of a target point location subscribed by a client is pushed, so that a message can be pushed to a target user in a targeted and relatively intelligent manner, relatively accurate popularization of contents such as services and products is realized, software and hardware resources of a push server are saved well, interference to users who do not need to push messages is avoided to a certain extent, and information pushing is accurate.
As an optional embodiment, before step S102, the method further includes:
carrying out information fixed length processing, information tail segmentation processing and information head adding on the changed point location information of the target point location to obtain the processed point location information of the target point location;
and sending the processed point location information of the target point location to a client corresponding to the target point location.
Specifically, the information fixed-length processing means: for each point location information message to be pushed, setting the size of the point location information message to be a fixed value, for example: the size of each message is fixed to be 1024 bytes, and the point location information which is less than the fixed value is filled with blank spaces so as to ensure that the integrity of the point location information is verified by a client.
The information tail division processing means: and adding carriage return line feed characters at the tail part of each message for segmentation so as to distinguish different messages.
Header addition means: the message to be transmitted is divided into a header and an information body, wherein the header is of a fixed length and can contain version number, packet information length and other information, and the length of the information body is dynamically determined by the transmitted point location information, so that the integrity and the correctness of the point location information can be conveniently checked by a client.
As an optional embodiment, before sending the processed point location information to the corresponding client, the method further includes:
receiving a third request of the client, wherein the third request comprises the network environment condition of the client;
and when the client is in the weak network environment, sending the processed point location information of the target point location to the client corresponding to the target point location by using a binary protocol.
In general, in a manner of pushing point location information to use a message, according to a requirement of a client, in a severe network condition (weak network, network is frequently flashed), the point location information is transmitted by using a binary protocol in this embodiment, so that the transmitted information is as small as possible, so that the client can also receive the information normally under a 2G condition (such as a tunnel, a parking lot, and the like), as an example, for example, if the number of service scene commands of us is not more than 16, and the content of the information is not more than 4 bytes, under such a condition, the point location information can be designed to be 5 bytes, which is 40 bits in total. Wherein the upper 4 bits can be used to represent commands and the lower 36 bits represent specific information content.
Benefits derived from the examples of this application:
the basic process of the information push service is user information demand understanding, thematic information searching and information periodic feedback. Firstly, a user inputs own information requirements into the system, wherein the information comprises personal profile information of the user, information topics which are interested by the user and the like, then the system or a person carries out targeted search on the network, and finally related information is pushed to a user host periodically. The outstanding feature here is the active service of information, that is, changing the 'person finding information' to 'information finding person', sending information to person through various ways such as mail, 'channel' delivery, reserved web page, mobile phone short message, etc. Many information services today have introduced services such as personalized channel customization, personal intelligent search agents, and the like.
(1) And the initiative is timely. The push service is the most basic characteristic of the push service, namely when new information needs to be submitted, the push software can actively remind a user to receive the new information according to different types and importance of the transmitted information. Thereby improving the timeliness of the user for acquiring information.
(2) Aiming at the purpose. The information provided by the push service is customized according to the specific requirements of the user, which fully embodies the personalized requirements of the user. The personalized service is dynamic, the user only needs to describe the information requirement at the beginning of customization, the pushing software can automatically track the use tendency of the user, and the pushing of the specific information is completed in real time.
(3) And (4) integration. In the pushing service, information personnel acquire information from various channels in various modes, process and integrate the information and transmit the information to users through fixed channels, and the processed information is obviously more comprehensive and has higher accuracy.
(4) Convenience and high efficiency. The user only needs to input the information request once, and continuous information service can be obtained. The push service also adopts an information agent mechanism, and can automatically track the information requirement of the user. The push service saves the time of active pulling of the user, reduces the transmission of redundant information, and improves the matching degree of the information, thereby greatly facilitating the user and improving the efficiency.
(5) Server pressure is reduced. Server push is generally more efficient than the way the client pulls the interface, since it does not have to establish a new connection for subsequent data. Since the connection is maintained all the time, even when there is no data transfer, the server must be willing to allocate these TCP/ip ports, which would be a serious problem for servers with a limited number of TCP/ip ports. The way in which the client pulls the interface is inefficient because it must establish a new connection for transferring data each time. It does not have to remain connected at all times. In practical situations, it often takes a considerable amount of time, up to a second or even more, to establish an HTTP connection. Server push is therefore more attractive to end users from a performance point of view, especially where information needs to be updated frequently. Another advantage of server push over the way the client pulls the interface is that server push is relatively easy to control. However, the client pulls the interface to establish a connection with the server, and the server needs to use a rather cumbersome algorithm in order to handle situations such as matching the client drag request with a specific end user. In server push, the connection is maintained throughout multiple responses, allowing the server to send more data at any time. One obvious benefit is that the server is fully able to control when and how often the data is updated. In addition, this method is efficient because the connection is maintained all the time.
Example two
As shown in fig. 2, this embodiment provides an event-driven information pushing apparatus, which is applied to a server, where the server is configured to manage point location information of preset point locations, and the apparatus includes:
a first obtaining unit 201, configured to obtain a first request from a client, where the first request includes a unique identifier of the client, and the first request is used to request a first connection between the client and a server;
the verification unit 202 is used for verifying the unique identification code, and after the unique identification code passes the verification, the connection with the client is kept;
a second obtaining unit 203, configured to obtain a second request from the client, where the second request includes a target point subscribed to the server by the client, and the target point is one of the preset point;
the storage unit 204 is configured to store a mapping relationship between the target point location and the client;
the monitoring unit 205 is configured to monitor point location information of a target point location, and when the point location information of the target point location changes, obtain a client corresponding to the target point location based on the mapping relationship;
a sending unit 206, configured to send the point location information of the changed target point location to a client corresponding to the target point location.
As an optional embodiment, the server stores the mapping relationship between the target point location and the client subscribing to the target point location in a mapping relationship table;
the monitoring unit 205 is further configured to obtain the client end associated with the target point from the mapping relationship stored in the mapping relationship table.
As an alternative embodiment, the unique identification code comprises:
the system time, the target IP address or the source IP address of the client, the HashCode value of the client and the random number generated based on the preset random number generation algorithm.
As an optional embodiment, the apparatus further comprises:
the processing unit is used for carrying out information fixed length processing, information tail segmentation processing and information head adding on the point location information of the changed target point location before sending the point location information of the changed target point location to the client corresponding to the target point location, so as to obtain the processed point location information of the target point location;
the sending unit 206 is further configured to send the processed point location information of the target point location to the client corresponding to the target point location.
As an alternative embodiment, the header comprises: the current version number and the information length of the point location information of the target point location.
As an optional embodiment, the apparatus further comprises:
the third obtaining unit is used for receiving a third request of the client before sending the processed point location information of the target point location to the client corresponding to the target point location, wherein the third request comprises the network environment condition of the client;
the sending unit 206 is further configured to send, by using a binary protocol, the processed point location information of the target point location to the client corresponding to the target point location when the client is in the weak network environment.
The technical scheme in the embodiment of the application at least has the following technical effects or advantages:
the server and the client which passes the verification are always connected, when the target point location subscribed to the server by the connected client is received, the mapping relation between the target point location and the client which subscribes the target point location is stored, then the point location information of the target point location subscribed by each client which keeps the connection is continuously monitored, when the point location information of the target point location changes, the client corresponding to the target point location is obtained, and the point location information of the changed target point location is actively pushed to the client.
EXAMPLE III
As shown in fig. 3, the present embodiment provides an electronic device 300 including: a memory 310, a processor 320 and a computer program 311 stored in the memory 310 and executable on the processor 320, wherein the processor 320 when executing the program 311 may implement the following method steps:
the method comprises the steps of obtaining a first request from a client, wherein the first request comprises a unique identification code of the client, and the first request is used for requesting the first connection between the client and a server; verifying the unique identification code, and keeping connection with the client after the unique identification code passes the verification; acquiring a second request from the client, wherein the second request comprises a target point subscribed to the server by the client, and the target point is one of the preset point; storing the mapping relation between the target point location and the client; monitoring point location information of the target point location, and acquiring a client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes; and sending the point location information of the changed target point location to a client corresponding to the target point location, wherein the server is used for managing the point location information of each preset point location.
In a specific implementation, when the processor 320 executes the program 311, any method step in the first embodiment may also be implemented.
Example four
As shown in fig. 4, a computer-readable storage medium 400, on which a computer program 411 is stored, which computer program 411, when being executed by a processor, carries out the steps of:
the method comprises the steps of obtaining a first request from a client, wherein the first request comprises a unique identification code of the client, and the first request is used for requesting the first connection between the client and a server; verifying the unique identification code, and keeping connection with the client after the unique identification code passes the verification; acquiring a second request from the client, wherein the second request comprises a target point subscribed to the server by the client, and the target point is one of the preset point; storing the mapping relation between the target point location and the client; monitoring point location information of the target point location, and acquiring a client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes; and sending the point location information of the changed target point location to a client corresponding to the target point location, wherein the server is used for managing the point location information of each preset point location.
In a specific implementation, the computer program 411 may implement any of the method steps of the first embodiment when executed by a processor.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. An event-driven information pushing method is applied to a server, and the server is used for managing point location information of preset point locations, and the method includes:
acquiring a first request from a client, wherein the first request comprises a unique identification code of the client, and the first request is used for requesting the first connection between the client and the server; the unique identification code includes:
the system time, the target IP address or the source IP address of the client, the HashCode value of the client and the random number generated based on a preset random number generation algorithm;
verifying the unique identification code, and keeping connection with the client after the unique identification code passes the verification;
acquiring a second request from the client, wherein the second request comprises a target point subscribed to the server by the client, and the target point is one of the preset point;
storing the mapping relation between the target point location and the client;
monitoring the point location information of the target point location, and acquiring the client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes;
sending the point location information of the changed target point location to the client corresponding to the target point location;
the server stores the mapping relation between the target point location and the client subscribing the target point location in a mapping relation table mode;
the obtaining of the client corresponding to the target point and maintaining connection with the server includes:
and acquiring the client associated with the target point from the mapping relation stored in the mapping relation table.
2. The event-driven-based information pushing method according to claim 1, before the sending the point location information of the changed target point location to the client corresponding to the target point location, further comprising:
performing information fixed length processing, information tail segmentation processing and information head adding on the changed point location information of the target point location to obtain the processed point location information of the target point location;
and sending the point location information of the processed target point location to the client corresponding to the target point location.
3. The event-driven-based information pushing method according to claim 2, wherein the information header includes: and the current version number and the information length of the point location information of the target point location.
4. The event-driven-based information pushing method according to claim 2, before sending the point location information of the processed target point location to the client corresponding to the target point location, further comprising:
receiving a third request of the client, wherein the third request comprises the network environment condition of the client;
and when the client is in a weak network environment, sending the point location information of the processed target point location to the client corresponding to the target point location by using a binary protocol.
5. An event-driven information pushing device is applied to a server, and the server is used for managing point location information of preset point locations, and the device comprises:
a first obtaining unit, configured to obtain a first request from a client, where the first request includes a unique identifier of the client, and the first request is used to request a first connection between the client and the server; the unique identification code includes:
the system time, the target IP address or the source IP address of the client, the HashCode value of the client and the random number generated based on a preset random number generation algorithm;
the verification unit is used for verifying the unique identification code and keeping connection with the client after the unique identification code passes verification;
a second obtaining unit, configured to obtain a second request from the client, where the second request includes a target point subscribed to the server by the client, and the target point is one of the preset point locations;
the storage unit is used for storing the mapping relation between the target point location and the client;
the monitoring unit is used for monitoring the point location information of the target point location, and acquiring the client corresponding to the target point location based on the mapping relation when the point location information of the target point location changes;
a sending unit, configured to send the point location information of the target point location after the change to the client corresponding to the target point location;
the server stores the mapping relation between the target point location and the client subscribing the target point location in a mapping relation table mode;
the obtaining of the client corresponding to the target point and kept connected to the server includes:
and acquiring the client associated with the target point from the mapping relation stored in the mapping relation table.
6. An electronic device, comprising: memory, processor and computer program stored on the memory and executable on the processor, the processor when executing the program may implement the method steps of any of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, comprising: the program may, when executed by a processor, implement the method steps of any of claims 1-4.
CN202010932543.2A 2020-09-08 2020-09-08 Event-driven information pushing method and device and electronic equipment Active CN112235184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010932543.2A CN112235184B (en) 2020-09-08 2020-09-08 Event-driven information pushing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010932543.2A CN112235184B (en) 2020-09-08 2020-09-08 Event-driven information pushing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112235184A CN112235184A (en) 2021-01-15
CN112235184B true CN112235184B (en) 2023-02-10

Family

ID=74116704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010932543.2A Active CN112235184B (en) 2020-09-08 2020-09-08 Event-driven information pushing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112235184B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114900453B (en) * 2022-04-21 2023-11-17 成都陆迪盛华科技有限公司 Internet of things type solution method for issuing voice frequency monitoring instructions among different clients

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2414830A1 (en) * 2002-12-19 2004-06-19 Sonic Mobility Inc. Proxy method and system for secure wireless administration of managed entities
CN109905312A (en) * 2017-12-08 2019-06-18 北京新媒传信科技有限公司 Information push method, apparatus and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104378344B (en) * 2014-05-26 2016-03-09 腾讯科技(深圳)有限公司 Log-on message transmission method, barcode scanning method and device, background server
CN108696374B (en) * 2017-04-10 2021-10-01 北京京东尚科信息技术有限公司 Method and device for updating client configuration
CN110460638A (en) * 2019-07-11 2019-11-15 深圳职业技术学院 Information push method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2414830A1 (en) * 2002-12-19 2004-06-19 Sonic Mobility Inc. Proxy method and system for secure wireless administration of managed entities
CN109905312A (en) * 2017-12-08 2019-06-18 北京新媒传信科技有限公司 Information push method, apparatus and system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
面向Android系统的内容推送方法应用研究;方耀耀等;《电脑知识与技术》;20160511(第07期);全文 *

Also Published As

Publication number Publication date
CN112235184A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
US10681127B2 (en) File upload method and system
US7793112B2 (en) Access to content addressable data over a network
US8239479B2 (en) Server-assisted and peer-to-peer synchronization
EP1921871B1 (en) A method and download agent for downloading in parallel
CN100407627C (en) Method and system for realizing end-to-end data sharing
JP5420087B2 (en) Method and system for providing a message including a universal resource locator
US20150237113A1 (en) Method and system for file transmission
CN101090371B (en) Method and system for user information management in at-once communication system
CN111770157B (en) Business processing method and device, electronic equipment and storage medium
CN103812849A (en) Local cache updating method and system, client and server
CN110430274A (en) A kind of document down loading method and system based on cloud storage
CN101364930A (en) Session control method, apparatus and system
CN112422702A (en) CDN back-to-source method, system and computer equipment
CN111245748A (en) File transmission method, device, system, electronic equipment and storage medium
CN102111426A (en) Method, system and device for implementing point-to-point technology
CN111708743A (en) File storage management method, file management client and file storage management system
CN101521606B (en) Log information processing method, log server and communication system
CN111597259B (en) Data storage system, method, device, electronic equipment and storage medium
CN112235184B (en) Event-driven information pushing method and device and electronic equipment
CN104580084A (en) Method, terminals and system for sharing multimedia file
US10402373B1 (en) Filesystem redirection
CN113364830B (en) Long-link cache optimization method and system
CN113472846B (en) Message processing method, device, equipment and computer readable storage medium
CN109688204B (en) File downloading method, node and terminal based on NDN (named data networking)
CN114268631A (en) Low-delay network system, communication connection method thereof and readable storage medium

Legal Events

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