Message Push Method, System and Storage Medium

By combining the server and business interface calls, the identity information and target basic information on the application side are acquired and encapsulated, and the problem of difficulty in achieving efficient message push by non-native App-type applications is solved, and quasi-real-time and low-cost message push is achieved, which improves the user experience.

CN115776512BActive Publication Date: 2025-05-27CHINA PING AN LIFE INSURANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211441262.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-17
Publication Date
2025-05-27
Estimated Expiration
2042-11-17

AI Technical Summary

Technical Problem

Applications that are not native App types, such as H5 and mini programs, are difficult to achieve efficient and low-cost message push, and the threshold is high. They need to obtain user mobile phone numbers, which limits the efficiency and user experience of message push.

Method used

By combining the server and the service interface call, the identity information of the application side is obtained and the target basic information is encapsulated into the return message of the service interface, and it is directly fed back to the application side. The application side extracts the target basic information and sends a message query request, and the server side querys and returns the target message details.

Benefits of technology

It realizes quasi-real-time message push to non-native apps such as H5 and mini programs, reduces push costs, improves push efficiency and user experience, avoids new interface calls, and ensures security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115776512B_ABST
    Figure CN115776512B_ABST
Patent Text Reader

Abstract

An embodiment of the present application provides a message push method, system, and storage medium, belonging to the field of computer technology. The message push method includes: the application side sends a service interface access request to the server side; the server side receives the access request, obtains target basic information corresponding to the identity information of the application side according to the access request, encapsulates the target basic information into the return message of the service interface, and sends the return message to the application side; the application side receives the return message sent by the server side, extracts the target basic information in the return message, and sends a message query request to the server side according to the target basic information; the server side queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application side. In the embodiment of the present application, message push is realized by combining with service interface calls, which can provide quasi-real-time message push, improve the push efficiency, and improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a message push method, system and storage medium. Background Art

[0002] Push messaging is a mechanism by which an application delivers information to users. Currently, more and more software interacts with users through push messaging.

[0003] In the related technologies, native applications (Application, App) have many message push mechanisms, mainly including mobile phone manufacturer channels, third-party push service platforms, long connections, etc. However, for non-native App type applications such as H5 and mini programs, the cost is relatively high, and SMS notifications are often required to implement information push. In addition, the threshold is relatively high, and the user's mobile phone number must be obtained. Therefore, the message push of a large number of applications is restricted, resulting in low push efficiency and reduced user experience. Summary of the invention

[0004] The main purpose of the embodiments of the present application is to propose a message push method, system and storage medium, which can provide quasi-real-time message push, improve push efficiency and improve user experience.

[0005] To achieve the above-mentioned purpose, the first aspect of an embodiment of the present application proposes a message push method, which includes: an application sends a business interface access request to a server; the server receives the access request, obtains the target basic information corresponding to the identity information of the application according to the access request, encapsulates the target basic information into a return message of the business interface, and sends the return message to the application; the application receives the return message sent by the server, extracts the target basic information in the return message, and sends a message query request to the server according to the target basic information; the server queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application.

[0006] In some embodiments, obtaining target basic information corresponding to the identity information of the application end according to the access request includes: splitting the access request and determining the identity information of the application end from the information splitting result; generating a query sub-request parallel to the access request according to the identity information; and obtaining target basic information corresponding to the identity information from pre-stored information according to the query sub-request.

[0007] In some embodiments, obtaining the target basic information corresponding to the identity information of the application end according to the access request includes: obtaining the message details generated in the business service and storing them in a memory to obtain first basic information; according to the access request, obtaining the target basic information corresponding to the identity information of the application end from multiple first basic information.

[0008] In some embodiments, according to the access request, obtaining the target basic information corresponding to the identity information of the application end from multiple first basic information includes: extracting the common field in the first basic information to obtain the second basic information; according to the access request, obtaining the target basic information corresponding to the identity information of the application end from multiple second basic information.

[0009] In some embodiments, encapsulating the target basic information into the return message of the business interface includes: obtaining the return message generated by the business interface based on the access request; determining the HTTP protocol message header information from the return message, and encapsulating the target basic information into the HTTP protocol message header information, so that the application end extracts the target basic information from the HTTP protocol message header information.

[0010] In some embodiments, the server queries the target message details corresponding to the target basic information according to the message query request, including: the server queries the target message details corresponding to the target basic information from pre-stored information through a preset universal interface according to the message query request; encapsulates the target message details according to the target data type, and sends the encapsulated target message details to the application through the universal interface.

[0011] In some embodiments, the target message details are encapsulated according to the target data type, and the encapsulated target message details are sent to the application end through the universal interface, including: determining the comprehensive content and push content in the target message details; retaining the data type of the comprehensive content, and encapsulating the push content according to the target data type, and obtaining the encapsulated target message details according to the comprehensive content and the encapsulated push content; and sending the encapsulated target message details to the application end through the universal interface.

[0012] In some embodiments, after sending the target message details to the application end, the method further includes: the application end receiving the target message details sent by the server end; extracting push content according to the target message details, and pushing the push content.

[0013] To achieve the above-mentioned purpose, the second aspect of an embodiment of the present application proposes a message push system, which includes an application end and a server end, wherein: the application end sends a business interface access request to the server end; the server end receives the access request, obtains the target basic information corresponding to the identity information of the application end according to the access request, encapsulates the target basic information into a return message of the business interface, and sends the return message to the application end; the application end receives the return message sent by the server end, extracts the target basic information in the return message, and sends a message query request to the server end according to the target basic information; the server end queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application end.

[0014] To achieve the above-mentioned purpose, the third aspect of the embodiments of the present application proposes a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program. When the computer program is executed by a processor, the method described in the first aspect of the embodiments is implemented.

[0015] The message push method, system and storage medium proposed in the present application, wherein the message push system is provided with an application end and a server end. When executing the message push method, the application end can send a business interface access request to the server end. In response to the access request, the server end obtains the target basic information corresponding to the identity information of the application end, encapsulates the target basic information into the return message of the business interface, and directly feeds back the target basic information to the application end through the return message of the business interface, without relying on other channels for interaction. After that, the application end can extract the target basic information in the return message and know that there is a message to be pushed, so it sends a message query request to the server end for query. The server end queries the target message details corresponding to the target basic information according to the message query request, and finally sends the target message details to the application end to realize message push. In the embodiment of the present application, message push is realized by combining with the business interface call, which can provide quasi-real-time message push, improve push efficiency, and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 It is a schematic diagram of a message push system provided in an embodiment of the present application;

[0017] Figure 2 is a schematic diagram of a message push system provided by another embodiment of the present application;

[0018] Figure 3 It is a flowchart of the message push method provided by an embodiment of the present application;

[0019] Figure 4 yes Figure 2Flow chart of step S102 in FIG.

[0020] Figure 5 yes Figure 2 Flow chart of step S102 in FIG.

[0021] Figure 6 yes Figure 5 Flow chart of step S302 in FIG.

[0022] Figure 7 yes Figure 2 Flow chart of step S102 in FIG.

[0023] Figure 8 yes Figure 2 Flow chart of step S104 in FIG.

[0024] Fig. 9 yes Figure 8 Flowchart of step S602 in FIG.

[0025] Fig.10 yes Figure 2 The flowchart after step S104 in FIG.

[0026] Fig.11 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0027] Fig.12 It is a structural diagram of the application end provided in the embodiment of the present application;

[0028] Fig.13 It is a structural diagram of the server provided in the embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0030] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0032] First, some nouns involved in this application are analyzed:

[0033] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, speech recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0034] Information push, or "web broadcasting", is a new technology that reduces information overload by regularly transmitting information needed by users on the Internet through certain technical standards or protocols. Push technology reduces the time spent searching on the Internet by automatically transmitting information to users. It searches and filters information based on the user's interests and pushes it to the user regularly, helping users to efficiently discover valuable information.

[0035] Hypertext Transfer Protocol (HTTP) is a simple request-response protocol that usually runs on top of TCP. It specifies what messages a client may send to a server and what responses it may get.

[0036] Client push messages, also known as message notifications, are a mechanism by which an application delivers information to a user. Common application scenarios include a company's operations or business system sending marketing messages or result messages to users through SMS, WeChat, push messages, and other channels. For example, when a user's membership level or membership status changes, it is necessary to promptly notify the user while the user is using the application page, or to respond interactively on the page, such as adding new display content or opening new function entrances. For example, during insurance renewal or payment, it is often necessary to push renewal reminder messages or payment messages.

[0037] There are many message push mechanisms for mobile phone native apps, mainly mobile phone manufacturer channels, third-party push service platforms, long connections, etc. However, for non-native app types such as digital products (H5 for short) and mini-programs made with the fifth generation of Internet Hypertext Markup Language (HTML5 / H5), the message push is relatively limited. For example, if SMS notification is used, the cost is relatively high, and it is required to obtain the user's mobile phone number, which has a high threshold. If the user does not authorize the mobile phone number, SMS notification cannot be implemented.

[0038] The applicant found that it is a difficult task to implement message push on the mini program. When the user enters the mini program, the user's latest identity information such as business line and seat needs to be identified, and the page will also display different content for different identities. However, because identity identification involves multiple dimensions and multiple systems, it is time-consuming. If the page is blocked and waits for identity identification to be completed before displaying, it will significantly affect the customer experience. Moreover, the user's identity may have changed in the background, and the front-end page cannot actively perceive it. It can only passively wait for the user to access certain content before the identity change can be applied to the business. In addition, for page performance, the front-end will also use caching, which makes it even more difficult to respond to identity changes in a timely manner.

[0039] Therefore, for non-native App applications, a distributed, low-cost, secure, efficient, and easy-to-use in-app message notification mechanism is needed, which can greatly enrich the interaction methods of such applications and can actively interact with users on the page like native Apps.

[0040] Based on this, the embodiments of the present application provide a message push method, system and storage medium, which can provide quasi-real-time message push, improve push efficiency and improve user experience.

[0041] The message push method, system and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the message push system in the embodiments of the present application is described.

[0042] The message push system is provided with an application end and a server end, wherein the application end may also be called a client end, and the application end may be an application such as App, H5, or a mini-program, or a front-end page of these applications, and the server end is a general term for a device or software that provides an interface service for the application end. In one embodiment, Figure 1 As shown, the server can be a gateway, or, as Figure 2As shown, the server side can be a general term for the gateway plus the backend server, which can provide services for the application side. In the embodiment of the present application, the front end mainly uses the front-end proxy layer to separate message events and schedule event responses; the gateway mainly splits requests from business requests, attaches messages to business requests, and responds to the general message detail query interface; the back end provides a message service to receive messages from the business system, process message caches, etc.

[0043] It should be noted that in common distributed architectures, there is an external network gateway facing the Internet, and the front-end access to the back-end interface will be loaded and forwarded by the gateway. Therefore, in the embodiments of the present application, the gateway is used to uniformly process global message notifications, and the gateway is used as a server, or as part of the server to implement the functions in the embodiments of the present application. In addition, the server can also be a network device that can implement the above-mentioned gateway function, which is not specifically limited here.

[0044] The message push method in the embodiment of the present application can be illustrated by the following embodiment.

[0045] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0046] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0047] The message push method provided in the embodiment of the present application relates to the field of computer technology. The message push method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the message push method, etc., but is not limited to the above forms.

[0048] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0049] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first. For example, when obtaining user stored data and the user's cached data access request, the user's permission or consent will be obtained first. Moreover, the collection, use and processing of these data will comply with the relevant laws, regulations and standards of the relevant countries and regions. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or separate consent will be obtained by means of a pop-up window or jumping to a confirmation page. After clearly obtaining the user's separate permission or separate consent, the necessary user-related data used to enable the normal operation of the embodiment of the present application will be obtained.

[0050] Figure 3 is an optional flowchart of the message push method provided in the embodiment of the present application. Figure 3 The method may include but is not limited to steps S101 to S104.

[0051] Step S101, the application sends a service interface access request to the server;

[0052] Exemplarily, the message push method in the embodiment of the present application can be executed in a message push system. The message push system is provided with an application end and a server end to implement the content of the message push method, which will not be repeated here.

[0053] Exemplarily, a network connection can be established between the application end and the server end, and the application end can maintain a connection with the server end through a business interface. The business interface can be an interface in the server end, for example, it can be a business interface on a gateway. In one embodiment, the application end sends a business interface access request to the server end and performs a regular business interface query. The embodiment of the present application combines with the business interface call to avoid the high-frequency polling of the application end affecting the server end and ensure security, thereby realizing the combination of message push and normal business interface query, which can avoid adding new interface calls and is a low-cost and safe method.

[0054] Step S102, the server receives the access request, obtains the target basic information corresponding to the identity information of the application according to the access request, encapsulates the target basic information into a return message of the business interface, and sends the return message to the application;

[0055] Exemplarily, after receiving an access request, the business interface of the server will respond to the access request and generate a return message. In an embodiment of the present application, after receiving the access request, the server obtains the target basic information corresponding to the identity information of the application according to the access request, and then encapsulates the target basic information into the return message of the business interface, and sends the return message to the application, thereby realizing message push through the original business interface without adding a new interface.

[0056] It is understandable that the target basic information is the basic information of the message push, that is, the message event, which can also be called a notification information, indicating that there is a message to be pushed under the identity information corresponding to the current application. Therefore, after the server receives the access request, it can parse the identity information of the application. If there is a message to be pushed under the corresponding identity information, the basic information of the message push, that is, the target basic information, is encapsulated in the return message and returned to the application together, without interfering with the input and output parameters of the business interface. For the business interface, the combination of this message notification mechanism and its interface is imperceptible.

[0057] Step S103, the application receives the return message sent by the server, extracts the target basic information in the return message, and sends a message query request to the server according to the target basic information;

[0058] For example, after receiving the return message sent by the server, the application will parse the return message to extract the basic information of the target in the return message, and learn that there is a message that needs to be pushed. Due to the limitations of the return message of the business interface, the basic information of the target in the return message cannot fully reflect the content that needs to be pushed, that is, it cannot complete the content of the response message event. Therefore, the application can send a message query request to the server for query.

[0059] It should be noted that when the application end is the front end, the front end can extract the message event carried by the return message through the proxy layer. For the carried message, the front end responds according to the message type, thereby generating a message query request and sending the message query request to the server. It should be pointed out that the application end in the embodiment of the present application can respond in two forms. For example, it can directly call a specific business interface to respond, or it can further query the message details through a general interface.

[0060] Step S104, the server queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application.

[0061] Exemplarily, after the server receives the message query request sent by the application, it can return specific content. Therefore, the server queries the target message details corresponding to the target basic information according to the message query request. It should be noted that the server pre-stores the message details of multiple messages. After receiving the message query request, the server can search for the corresponding message details from the stored data according to the identity information of the application, and use them as the target message details, thereby sending the target message details to the application to complete the message push.

[0062] It should be pointed out that in common B / S structures, unless a long connection mechanism such as socket is used, it is impossible to achieve true active notification from the server to the application. To achieve this effect, a common idea is to perform regular polling on the front end to query whether there is any new message on the back end interface. However, there are two problems with this. First, a large number of high-frequency queries on the application end put a lot of pressure on the back end server. It may happen that this type of polling is larger than the call volume of all other business interfaces, affecting the performance and stability of business services. In addition, if the application end does not operate the page to access the back end interface for a period of time, H5 and other types of applications are generally designed to automatically expire the session. If polling is performed, it is equivalent to extending the customer's session all the time, and the expiration mechanism becomes invalid. This is particularly unsafe for accessing H5 in public places.

[0063] Therefore, in the embodiment of the present application, by combining message push with normal business interface query, new interface calls can be avoided. This is a low-cost and safe way to return basic notification information through the business interface in advance without interfering with the input and output parameters of the business interface. For the business interface, the combination of this message notification mechanism and its interface is imperceptible. Therefore, it can be used in non-native apps such as H5 and mini programs, and can provide quasi-real-time message push, improve push efficiency, and improve user experience.

[0064] In the embodiment of the present application, quasi-real-time message notifications can be provided. For the traditional interactive mode of H5, which is passive and relies on users to initiate access, a new interactive mode that is actively carried out by the application is added. For example, it can support the asynchronization of time-consuming tasks, optimize customer experience, and support the operation of pushing activity messages to improve conversion. It can be widely used in the fields of finance, insurance, etc.

[0065] It should be noted that the service interface includes but is not limited to an Ethernet interface, a POS (packet over SONET / SDH) interface, etc. The Ethernet interface is, for example, a flexible Ethernet service interface (flexible Ethernet clients, FlexEClients).

[0066] See also Figure 4 In some embodiments, step S102 may further include steps S201 to S203:

[0067] Step S201, splitting the access request information, and determining the identity information of the application end from the information splitting result;

[0068] Step S202, generating a query sub-request in parallel with the access request according to the identity information;

[0069] Step S203: According to the query sub-request, basic target information corresponding to the identity information is obtained from pre-stored information.

[0070] Exemplarily, the server can perform information splitting on the access request to complete the splitting subtasks. First, the identity information of the application is determined from the information splitting result, and whether there is information corresponding to the identity information in the stored information that needs to be pushed. If so, a query subrequest is generated in parallel with the access request based on the identity information, and the target basic information corresponding to the identity information is obtained from the pre-stored information according to the query subrequest. In the embodiment of the present application, the server is responsible for splitting the message query subtask from the business request, and a parallel subrequest is derived for each business interface request. The original request is normally routed to the corresponding business interface server, and the newly added subrequest accesses the message cache in parallel, using the identity information, that is, the user ID (userId) as the keyword to query whether there is the latest message of the user in the message cache, and finally the message event is attached to the return message of the business interface and returned to the application together.

[0071] It should be noted that the server has a prerequisite for splitting the access request information, which is to obtain the user ID userId. Depending on the authentication mechanism, the userId may be obtained directly from the message header details (Http Header) of the access request, or it may be obtained by decrypting the JSON Web Token (JWT), or it may be obtained by exchanging the token with the authentication service to obtain the userId. Therefore, only the user himself can access his own message by accessing the page interface.

[0072] It should be pointed out that JWT is an open standard based on JSON (RFC7519) developed to transmit statements between network application environments. JWT is a lightweight, secure cross-platform transmission format that defines a compact, self-contained way for communicating parties to exercise secure information transmission using JSON objects. In a broad sense, JWT is a standard name; in a narrow sense, JWT refers to the token string used for transmission. JWT is used to store userId and other non-sensitive but business-required numbers: such as user name, cell number, etc. Other sensitive data, such as user name, ID number, and mobile phone number, are not placed in JWT.

[0073] In addition, during the splitting, the server splits a message query request for all requests. For a more complicated case, the time of the last message query can be cached in redis. If the message is within a certain time (such as queried within 3 seconds), no message query request can be split to avoid excessive query frequency. If the overall interface request is not very frequent, a simple solution can be used.

[0074] Moreover, in the embodiment of the present application, the server can set a whitelist and exempt certain requests from splitting based on the configuration. For example, the calls to the embedding interface may be very frequent, and such interfaces can be added to the splitting whitelist and not split.

[0075] See also Figure 5 In some embodiments, step S102 may further include steps S301 to S302:

[0076] Step S301, obtaining message details generated in the business service and storing them in a memory to obtain first basic information;

[0077] Step S302: According to the access request, target basic information corresponding to the identity information of the application end is obtained from multiple first basic information.

[0078] Exemplarily, messages are generally generated by business services, and the message content structures of different businesses may be quite different. The embodiment of the present application adopts the processing of message abstraction and unified encapsulation. After the backend or business system generates a new message, for the specific message details, the server obtains the message details generated in the business service and stores them in a persistent device such as a database to obtain the first basic information. Therefore, the first basic information is the information pre-stored in the memory. Subsequently, the server can obtain the target basic information corresponding to the identity information of the application end from multiple first basic information according to the access request.

[0079] For example, when a user modifies personal information in the personal center, asynchronous identity recognition is triggered. The recognition completion itself is a message. Therefore, the server stores the business information related to this message, such as whether the user is a customer, whether the user is in the dial-up database, business line, and UM, in the memory to complete the storage. The information in the database is the first basic information.

[0080] See also Figure 6 In some embodiments, step S302 may further include steps S401 to S402:

[0081] Step S401, extracting common fields in the first basic information to obtain second basic information;

[0082] Step S402: According to the access request, target basic information corresponding to the identity information of the application end is obtained from multiple second basic information.

[0083] Exemplarily, in the embodiment of the present application, for message events, the data structure is abstracted into several unified and common fields. Therefore, the common fields in the first basic information are extracted to obtain the second basic information. Finally, according to the access request, the target basic information corresponding to the identity information of the application end is obtained from multiple second basic information.

[0084] The second basic information is a message event generated by the server according to the message notification specification and stored in the storage, which can be a redis cache. Because a user may have multiple messages, the message is a list. In order to avoid affecting the access performance of the business interface, the message contains the least fields, and they are all short fields.

[0085] In one embodiment, the target basic information includes the message ID, message type, and message generation service name. For example, the second basic information may include the following information:

[0086] Event key: msg_notify_[userId] / / userId is the user's unique ID, ensuring that only the user can access it;

[0087] Event value: message ID, message type, message generation service name;

[0088] For example, the message used for identity identification in the second basic information is as follows:

[0089] Event key: msg_notify_[userId];

[0090] Event value: [{msgId:100000001001, msgType: "userRecognize", msgSrv: "userService"}];

[0091] It is understandable that in the process of extracting the common fields in the first basic information, the embodiment of the present application may predefine some common fields, for example:

[0092] msgId:100000001001: message ID, used to mark different messages;

[0093] msgType: "userRecognize": message type, used to distinguish message types for different responses and processing;

[0094] Type "userRecognize": indicates that a new user identity has been identified. The front-end can query the latest identity accordingly and guide the user to jump to a specific page that matches the identity, thus achieving the goal of the back-end notifying the front-end to actively interact with the user.

[0095] msgSrv:"userService": used to identify the source of the message (service provider). When you need to obtain message details, you can route to the corresponding service based on this value to obtain message details.

[0096] It is understandable that the message event in the above embodiment mainly completes the function of message notification, and the performance of the host service interface request cannot be affected by the excessive length of the message content. Therefore, the event-related data is refined and only the most necessary and useful fields are transmitted. The event-related details can be obtained by the front end according to different message types, and then an independent request is initiated to obtain more details to support the processing of the message event, that is, the message query request in the above embodiment.

[0097] See also Figure 7 In some embodiments, step S102 may further include steps S501 to S502:

[0098] Step S501, obtaining a return message generated by the service interface based on the access request;

[0099] Step S502, determining HTTP protocol message header information from the returned message, and encapsulating the target basic information into the HTTP protocol message header information, so that the application end extracts the target basic information from the HTTP protocol message header information.

[0100] Exemplarily, in the embodiment of the present application, the server can encapsulate the message into the HTTP protocol message header information of the return message after querying the message and before returning it. Specifically, the HTTP protocol message header information is a message header, that is, an HTTP message header or an HTTP header. In the embodiment of the present application, in order to further reduce coupling, the message-related data is placed in the HTTP header of the business interface request and the return message, which does not interfere with the input and output parameters of the business interface. For the business interface, the combination of this message notification mechanism and its interface is imperceptible.

[0101] Exemplarily, after the server finds a new message, it serializes it into a string and stores it in the HTTP protocol message header information returned by the business interface with a specific keyword X-MSG-NOTIFY-EVENTS. For example, the following message event is encapsulated in the HTTP protocol message header information:

[0102] Header: X-MSG-NOTIFY-EVENTS;

[0103] Value: [{msgId:100000001001,msgType:”userRecognize”,msgSrv:”userService”},{…}];

[0104] It should be pointed out that the fields are message ID, message type, and message generation service name.

[0105] In addition, it should be noted that messages can also be placed in the HTTP message body. However, this is invasive and too coupled for business interface messages, and even requires the meaning of the fields to be explained in all business interface documents. It is necessary to pay attention to the details of the message mechanism, which increases the burden, and it is also easy to have field conflicts and mutual influence of message structures. In addition, if the business interface has an exception and no message is returned, it is difficult to attach a message. Therefore, in the embodiments of the present application, the information is preferentially encapsulated in the HTTP protocol message header information.

[0106] See also Figure 8 In some embodiments, step S104 may further include steps S601 to S602:

[0107] Step S601, the server searches for target message details corresponding to target basic information from pre-stored information through a preset universal interface according to a message query request;

[0108] Step S602: encapsulate the target message details according to the target data type, and send the encapsulated target message details to the application end through the general interface.

[0109] Exemplarily, a general interface is designed in the embodiment of the present application, which can be used to query the details of the message push. After the application uses the proxy layer to extract the message event carried by the return message, the application can further query the message details through the general interface according to the message type for the carried message. Specifically, the server queries the target message details corresponding to the target basic information from the pre-stored information through the preset general interface according to the message query request, and then encapsulates the target message details according to the target data type, and sends the encapsulated target message details to the application through the general interface.

[0110] It should be noted that the general interface is an interface dominated by the server and is a unified query interface. Because messages come from different services, the message details need to be provided by each business system. However, business systems generally do not need to design a separate message detail query interface, so only a general interface can be implemented to return message details. The interface is provided by the server to the application. Because messages come from different services, message detail queries can be forwarded by the server to the corresponding service. After obtaining the message details from a specific business system, the server returns the message to the application.

[0111] It should be pointed out that the target data type is a preset data type. After the target details are encapsulated by the target data type, it can adapt to field differences and extensions. In the embodiment of the present application, the entire content of the target message details can be encapsulated using the format of the target data type, or only part of the content of the target message details can be encapsulated using the format of the target data type.

[0112] See also Fig. 9 In some embodiments, step S602 may further include steps S701 to S703:

[0113] Step S701, determining the comprehensive content and push content in the target message details;

[0114] Step S702, retaining the data type of the comprehensive content, and encapsulating the push content by the target data type, and obtaining encapsulated target message details according to the comprehensive content and the encapsulated push content;

[0115] Step S703: Send the encapsulated target message details to the application end through the general interface.

[0116] For example, the target message details in the embodiment of the present application include comprehensive content and push content, wherein the comprehensive content is some content indicating the message name, type and other information, and the push content is the content in the message that is pushed to the user for viewing. For example, the comprehensive content can be the message ID, message type, message generation service name, and the push content is the detailed message content.

[0117] In the embodiment of the present application, it is possible to identify whether it is comprehensive content or pushed content according to different fields in the target message details. After identifying different contents, part of the target message details is encapsulated in the format of the target data type. Specifically, in the embodiment of the present application, the data type of the comprehensive content is retained, and the pushed content is encapsulated by the target data type, and the encapsulated target message details are obtained according to the comprehensive content and the encapsulated pushed content, and finally the encapsulated target message details are sent to the application end through the general interface.

[0118] It is understandable that when querying details on the server side, the message ID, message type, and message generation service name contained in the target basic information returned to the application side in the previous process are used as interface input parameters. The server side routes to the corresponding service according to the service name, and uniformly encapsulates and returns after querying the details. Services that need to query details implement standard interfaces to support queries. In order to adapt to field differences and expansions, the target data type is a JSON format data type. JSON format is a data exchange format that can easily read data, so the details are encapsulated in JSON format.

[0119] If necessary, this can be explained through the following examples.

[0120] For example, the target basic information, as a message event notification, already carries the necessary information. If the application-side proxy layer needs to access the general interface for querying message details, the application uses the message ID, message type, and message generation service name in the message event as interface input parameters, for example:

[0121] {msgId:100000001001,msgType:”userRecognize”,msgSrv:”userService”};

[0122] Subsequently, when the server, such as the gateway filter, obtains this interface request, it parses the parameter message therein to generate the service name msgSrv, and uses the feign method to call the interface implemented by the corresponding system.

[0123] Finally, the gateway queries the message details from the business system and returns them in a unified package. In order to adapt to field differences and expansions, the details are packaged in JSON format, including message ID, message type, message generation service name, and message content (JSON).

[0124] For example, the target message details (taking the identity identification message details as an example) are as follows:

[0125] {msgId:100000001001,msgType:"userRecognize",msgSrv:"userService",details:{ifCustomer:"Y",...}};

[0126] The first few fields mentioned above are existing information. After the message details of the business system are serialized into a JSON string, they can be encapsulated in the details field of the message returned to the application. The application can obtain the target message details by parsing the details field.

[0127] See also Fig.10 In some embodiments, after step S104, steps S801 to S802 may also be included:

[0128] Step S801, the application receives the target message details sent by the server;

[0129] Step S802: extract push content according to target message details and push the push content.

[0130] Exemplarily, after receiving the target message details sent by the server, the application can make further responses according to the content. Therefore, the application can extract the push content according to the target message details and push the push content obtained above. For example, when the target message details are identity identification message details, it is necessary to feedback that the customer is a C-end in-dial user, so the application actively pops up a window on the front-end page to guide the user to participate in the activity with the threshold of in-dial customers to complete the message push.

[0131] It should be noted that the message push method in the embodiment of the present application is adaptable to various application types, and can be applicable to various types of applications such as H5, mini-programs, native apps, etc., providing a new interaction mode similar to native apps for application creation other than native apps; in addition, it can also be combined with business interface calls to minimize the frequency of calls to the server, taking into account performance and real-time performance, ensuring security, and not adding additional risks; and combined with the gateway to reduce business coupling and intrusion and transformation of the business system; at the same time, it also supports distributed cluster deployment and microservice architecture; and uses a flexible JSON structure to save messages, and supports the expansion of message types and structures; in addition, it also has the advantages of persistent and recoverable messages; and uses the native mechanism of the HTTP protocol, with good compatibility, and can be supported by all browser versions.

[0132] See also Figure 1 or Figure 2 As shown, the embodiment of the present application also provides a message push system, which can implement the above message push method. The message push system includes: an application end and a server end, wherein:

[0133] The application sends a business interface access request to the server;

[0134] The server receives the access request, obtains the target basic information corresponding to the identity information of the application according to the access request, encapsulates the target basic information into the return message of the business interface, and sends the return message to the application;

[0135] The application receives the return message sent by the server, extracts the target basic information in the return message, and sends a message query request to the server according to the target basic information;

[0136] The server queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application.

[0137] Exemplarily, a network connection can be established between the application end and the server end, and the application end can maintain a connection with the server end through a business interface. The business interface can be an interface in the server end, for example, it can be a business interface on a gateway. In one embodiment, the application end sends a business interface access request to the server end and performs a regular business interface query. The embodiment of the present application combines with the business interface call to avoid the high-frequency polling of the application end affecting the server end and ensure security, thereby realizing the combination of message push and normal business interface query, which can avoid adding new interface calls and is a low-cost and safe method.

[0138] Exemplarily, after receiving an access request, the business interface of the server will respond to the access request and generate a return message. In an embodiment of the present application, after receiving the access request, the server obtains the target basic information corresponding to the identity information of the application according to the access request, and then encapsulates the target basic information into the return message of the business interface, and sends the return message to the application, thereby realizing message push through the original business interface without adding a new interface.

[0139] It is understandable that the target basic information is the basic information of the message push, that is, the message event, which can also be called a notification information, indicating that there is a message to be pushed under the identity information corresponding to the current application. Therefore, after the server receives the access request, it can parse the identity information of the application. If there is a message to be pushed under the corresponding identity information, the basic information of the message push, that is, the target basic information, is encapsulated in the return message and returned to the application together, without interfering with the input and output parameters of the business interface. For the business interface, the combination of this message notification mechanism and its interface is imperceptible.

[0140] For example, after receiving the return message sent by the server, the application will parse the return message to extract the basic information of the target in the return message, and learn that there is a message that needs to be pushed. Due to the limitations of the return message of the business interface, the basic information of the target in the return message cannot fully reflect the content that needs to be pushed, that is, it cannot complete the content of the response message event. Therefore, the application can send a message query request to the server for query.

[0141] It should be noted that when the application end is the front end, the front end can extract the message event carried by the return message through the proxy layer. For the carried message, the front end responds according to the message type, thereby generating a message query request and sending the message query request to the server. It should be pointed out that the application end in the embodiment of the present application can respond in two forms. For example, it can directly call a specific business interface to respond, or it can further query the message details through a general interface.

[0142] Exemplarily, after the server receives the message query request sent by the application, it can return specific content. Therefore, the server queries the target message details corresponding to the target basic information according to the message query request. It should be noted that the server pre-stores the message details of multiple messages. After receiving the message query request, the server can search for the corresponding message details from the stored data according to the identity information of the application, and use them as the target message details, thereby sending the target message details to the application to complete the message push.

[0143] It should be pointed out that in common B / S structures, unless a long connection mechanism such as socket is used, it is impossible to achieve true active notification from the server to the application. To achieve this effect, a common idea is to perform regular polling on the front end to query whether there is any new message on the back end interface. However, there are two problems with this. First, a large number of high-frequency queries on the application end put a lot of pressure on the back end server. It may happen that this type of polling is larger than the call volume of all other business interfaces, affecting the performance and stability of business services. In addition, if the application end does not operate the page to access the back end interface for a period of time, H5 and other types of applications are generally designed to automatically expire the session. If polling is performed, it is equivalent to extending the customer's session all the time, and the expiration mechanism becomes invalid. This is particularly unsafe for accessing H5 in public places.

[0144] Therefore, in the embodiment of the present application, by combining message push with normal business interface query, new interface calls can be avoided. This is a low-cost and safe way to return basic notification information through the business interface in advance without interfering with the input and output parameters of the business interface. For the business interface, the combination of this message notification mechanism and its interface is imperceptible. Therefore, it can be used in non-native apps such as H5 and mini programs, and can provide quasi-real-time message push, improve push efficiency, and improve user experience.

[0145] In the embodiment of the present application, quasi-real-time message notifications can be provided. For the traditional interactive mode of H5, which is passive and relies on users to initiate access, a new interactive mode that is actively carried out by the application is added. For example, it can support the asynchronization of time-consuming tasks, optimize customer experience, and support the operation of pushing activity messages to improve conversion. It can be widely used in the fields of finance, insurance, etc.

[0146] The specific implementation of the message push system is basically the same as the specific implementation of the message push method described above, and will not be repeated here. On the premise of meeting the requirements of the embodiment of the present application, the message push system can also be provided with other functional modules to implement the message push method in the above embodiment.

[0147] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above message push method or cache reading method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.

[0148] See also Fig.11 , Fig.11 The hardware structure of the electronic device 1100 of another embodiment is shown. Fig.12 and Fig.13As shown, the electronic device 1100 may be a device in an application end or a server end, and is set in the application end or the server end to implement the message push method in the above embodiment. The electronic device 1100 includes:

[0149] The processor 1101 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0150] The memory 1102 may be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1102 may store an operating system and other applications. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 1102, and the processor 1101 calls and executes the message push method of the embodiments of this application;

[0151] Input / output interface 1103, used to implement information input and output;

[0152] The communication interface 1104 is used to realize the communication interaction between the device and other devices. The communication can be realized through a wired manner (such as USB, network cable, etc.) or a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0153] A bus 1105 that transmits information between various components of the device (e.g., the processor 1101, the memory 1102, the input / output interface 1103, and the communication interface 1104);

[0154] The processor 1101 , the memory 1102 , the input / output interface 1103 and the communication interface 1104 are connected to each other in communication within the device via the bus 1105 .

[0155] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned message pushing method is implemented.

[0156] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0157] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0158] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0159] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0160] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0161] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0162] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0163] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0164] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0165] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0166] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0167] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A message push method, characterized in that, the method includes: The application end sends a service interface access request to the server end; wherein, the application end is a non-native App; The server end receives the access request, obtains target basic information corresponding to the identity information of the application end according to the access request, obtains a return message generated by the service interface based on the access request, determines HTTP protocol message header information from the return message, encapsulates the target basic information into the HTTP protocol message header information, and sends the return message to the application end, so that the application end extracts the target basic information from the HTTP protocol message header information; wherein, the target basic information indicates that there is a message to be pushed under the identity information corresponding to the application end; The application end receives the return message sent by the server end, extracts the target basic information in the return message, and sends a message query request to the server end according to the target basic information; The server end queries the target message details corresponding to the target basic information according to the message query request, and sends the target message details to the application end.

2. The message push method according to claim 1, characterized in that, the obtaining the target basic information corresponding to the identity information of the application end according to the access request includes: Performing information splitting on the access request, and determining the identity information of the application end from the information splitting result; Generating a query sub-request parallel to the access request according to the identity information; Obtaining target basic information corresponding to the identity information from the pre-stored information according to the query sub-request.

3. The message push method according to claim 1 or 2, characterized in that, the obtaining the target basic information corresponding to the identity information of the application end according to the access request includes: Obtaining message details generated in the business service and storing them in a memory to obtain first basic information; Obtaining target basic information corresponding to the identity information of the application end from multiple pieces of the first basic information according to the access request.

4. The message push method according to claim 3, characterized in that, the obtaining the target basic information corresponding to the identity information of the application end from multiple pieces of the first basic information according to the access request includes: Extracting general fields in the first basic information to obtain second basic information; Obtaining target basic information corresponding to the identity information of the application end from multiple pieces of the second basic information according to the access request.

5. The message push method according to claim 1, characterized in that, the server end querying the target message details corresponding to the target basic information according to the message query request includes: The server end queries the target message details corresponding to the target basic information from the pre-stored information through a preset general interface according to the message query request; Encapsulating the target message details according to the target data type, and sending the encapsulated target message details to the application end through the general interface.

6. The message pushing method according to claim 5, wherein, the encapsulating the target message details according to the target data type and sending the encapsulated target message details to the application side through the general interface includes: determining the comprehensive content and the pushing content in the target message details; retaining the data type of the comprehensive content, encapsulating the pushing content according to the target data type, and obtaining the encapsulated target message details according to the comprehensive content and the encapsulated pushing content; sending the encapsulated target message details to the application side through the general interface.

7. The message pushing method according to claim 1 or 6, wherein, after sending the target message details to the application side, the method further includes: the application side receiving the target message details sent by the server side; extracting the pushing content according to the target message details and pushing the pushing content.

8. A message pushing system, wherein, the system includes an application side and a server side, wherein: the application side sends a service interface access request to the server side; wherein, the application side is a non-native App; the server side receives the access request, obtains target basic information corresponding to the identity information of the application side according to the access request, obtains a return message generated by the service interface based on the access request, determines HTTP protocol message header information from the return message, encapsulates the target basic information into the HTTP protocol message header information, and sends the return message to the application side, so that the application side extracts the target basic information from the HTTP protocol message header information; wherein, the target basic information indicates that there is a message to be pushed under the identity information corresponding to the application side; the application side receives the return message sent by the server side, extracts the target basic information in the return message, and sends a message query request to the server side according to the target basic information; the server side queries the target message details corresponding to the target basic information according to the message query request and sends the target message details to the application side.

9. A computer-readable storage medium storing a computer program, wherein, the computer program, when executed by a processor, implements the message pushing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method, equipment and method for inserting advertisements

    CN101945132A