Methods, devices, equipment and storage media for sharing logistics information to the Life Account
By acquiring logistics order information and parsing user IDs, Kafka pushes logistics information to WeChat or Alipay service accounts, solving the problems of difficult and inconvenient integration across logistics company systems, and achieving rapid information sharing and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-28
- Publication Date
- 2026-03-10
AI Technical Summary
Existing logistics information tracking methods suffer from difficulties in integrating with cross-logistics company systems and operational inconveniences, resulting in high development costs for enterprises and a poor user experience.
By acquiring logistics order information, parsing it to obtain the sender and recipient user IDs, and using Kafka to push the logistics order information to the logistics service system, the system generates push messages after receiving the logistics information and pushes them to WeChat or Alipay life accounts to achieve information sharing.
It enables rapid and timely information notification, improves user experience, reduces enterprise communication costs, and simplifies the logistics information sharing process.
Smart Images

Figure CN116109227B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of logistics, and in particular to a method and device for sharing logistics information to a life number, equipment and storage medium. BACKGROUND
[0002] There are two existing logistics information tracking methods. The first method is to obtain real-time logistics information by connecting the information system of a logistics company. However, it is difficult to negotiate with different logistics companies because the information system of a logistics company is a proprietary system. In addition, the information systems of different logistics companies are inconsistent, and it is necessary to invest in the development of different systems. Moreover, it is necessary to increase the workload of connecting and developing new logistics companies for cooperation. The second method is to develop an information system across logistics companies to obtain real-time logistics information. This requires the logistics company to increase specific operations in addition to the standard operations, which increases the workload of the employees involved in the logistics process. In addition, the operation is not convenient and is not easy to promote.
[0003] Therefore, the prior art still needs to be improved and developed. SUMMARY
[0004] The present application provides a method and device for sharing logistics information to a life number, equipment and storage medium, which is used to push the configured logistics information of a logistics order, a sender user ID and a receiver user ID to a life number in a WeChat client or a life number in an Alipay client, so as to push the life number in the WeChat client or the life number in the Alipay client to the sender and the receiver.
[0005] The first aspect of the present application provides a method for sharing logistics information to a life number, which comprises: obtaining logistics order information, and obtaining a sender user ID and a receiver user ID based on the obtained logistics order information; pushing the order number of the logistics order information to a logistics service system based on Kafka, and receiving the logistics information corresponding to the logistics order information returned by the logistics service system; generating a first push message based on the logistics order information and the logistics information corresponding to the logistics order information, and pushing the first push message to an information configuration system; receiving the first logistics information configured by the information configuration system, and processing the first logistics information to obtain second logistics information; generating a second push message based on the second logistics information, the sender user ID and the receiver user ID, and pushing the second push message to a life number in a WeChat client or a life number in an Alipay client.
[0006] Optionally, in the first implementation manner of the first aspect, the method further includes: obtaining the logistics order information, and parsing the logistics order information to obtain a sender mobile phone number and a receiver mobile phone number; matching the sender mobile phone number with mobile phone numbers in the user center database to obtain a sender user ID, and synchronizing the sender user ID and the sender mobile phone number through Kafka; and matching the receiver mobile phone number with mobile phone numbers in the user center database to obtain a receiver user ID, and synchronizing the receiver user ID and the receiver mobile phone number through Kafka.
[0007] Optionally, in the second implementation manner of the first aspect, the method further includes: obtaining the logistics order information, and parsing the logistics order information to obtain a plurality of order elements of the logistics order information, the order elements including an order generation time, an order number, a waybill number, sender address information, a sender mobile phone number, receiver address information, and a receiver mobile phone number; extracting the plurality of order elements according to a first preset field to obtain the sender mobile phone number; and extracting the plurality of order elements according to a second preset field to obtain the receiver mobile phone number.
[0008] Optionally, in the third implementation manner of the first aspect, the method further includes: when receiving a data storage instruction, writing the logistics order information into a cluster of a Kafka message queue; storing the written logistics order information in units of titles; calling the order number of the logistics order information in the Kafka message queue to push the order number to the logistics service system; sending a logistics information query request based on the order number pushed to the logistics service system, and receiving logistics information returned by the logistics service system.
[0009] Optionally, in the fourth implementation manner of the first aspect, the method further includes: when receiving a data storage instruction, writing the logistics information corresponding to the logistics order information into a cluster of a Kafka message queue; storing the written logistics information corresponding to the logistics order information in units of titles; and calling the logistics order information and the logistics information corresponding to the logistics order information in the Kafka message queue to generate a first push message.
[0010] Optionally, in a fifth implementation form of the first aspect of the present application, the receiving the first logistics information configured by the information configuration system and processing the first logistics information to obtain second logistics information comprises: receiving the first logistics information configured by the information configuration system and counting the number of the first logistics information at the same time node; if the first logistics information includes at least two, removing the waybill number of each first logistics information one by one to obtain a corresponding number of processed logistics information; comparing all the processed logistics information, and merging the first logistics information corresponding to the processed logistics information with the same content to obtain the second logistics information.
[0011] Optionally, in a sixth implementation form of the first aspect of the present application, the generating a second push message based on the second logistics information, the sender user ID and the receiver user ID and pushing the second push message to a life number in a WeChat client or a life number in an Alipay client comprises: generating a second push message based on the second logistics information, the sender user ID and the receiver user ID; generating control information according to a preset message push format; pushing the second push message and the control information to a life number in a WeChat client or a life number in an Alipay client.
[0012] The second aspect of the present application provides a device for sharing logistics information to a life number, comprising an acquisition module configured to acquire logistics order information and acquire a sender user ID and a receiver user ID based on the acquired logistics order information; a first push module configured to push an order number of the logistics order information to a logistics service system based on Kafka and receive logistics information corresponding to the logistics order information returned by the logistics service system; a second push module configured to generate a first push message based on the logistics order information and the logistics information corresponding to the logistics order information and push the first push message to an information configuration system; a processing module configured to receive first logistics information configured by the information configuration system and process the first logistics information to obtain second logistics information; and a third push module configured to generate a second push message based on the second logistics information, the sender user ID and the receiver user ID and push the second push message to a life number in a WeChat client or a life number in an Alipay client.
[0013] Optionally, in the first implementation of the second aspect of the present application, the obtaining module comprises: an obtaining unit, configured to obtain the logistics order information, and parse the logistics order information to obtain the sender's mobile phone number and the receiver's mobile phone number; a first matching unit, configured to match the sender's mobile phone number with the mobile phone numbers in the user center database, obtain the sender's user ID, and synchronize the sender's user ID and the sender's mobile phone number through Kafka; and a second matching unit, configured to match the receiver's mobile phone number with the mobile phone numbers in the user center database, obtain the receiver's user ID, and synchronize the receiver's user ID and the receiver's mobile phone number through Kafka.
[0014] Optionally, in the second implementation of the second aspect of the present application, the first pushing module comprises: a first writing unit, configured to write the logistics order information into the cluster of the Kafka message queue when receiving a data storage instruction; a first storage unit, configured to store the written logistics order information in units of titles; a first pushing unit, configured to call the order number of the logistics order information in the Kafka message queue and push it to the logistics service system; and a query request unit, configured to send a logistics information query request based on the order number pushed to the logistics service system, and receive the logistics information returned by the logistics service system.
[0015] Optionally, in the third implementation of the second aspect of the present application, the second pushing module comprises: a second writing unit, configured to write the logistics information corresponding to the logistics order information into the cluster of the Kafka message queue when receiving a data storage instruction; a second storage unit, configured to store the written logistics information corresponding to the logistics order information in units of titles; and a first message generation unit, configured to call the logistics order information and the logistics information corresponding to the logistics order information in the Kafka message queue and generate a first pushing message.
[0016] Optionally, in the fourth implementation of the second aspect of the present application, the processing module comprises: a statistical unit, configured to receive the first logistics information configured by the information configuration system, and count the number of the first logistics information at the same time node; a first processing unit, configured to one by one eliminate the waybill number of each first logistics information after determining that the first logistics information comprises at least two, to obtain a corresponding number of processed logistics information; and a second processing unit, configured to compare all the processed logistics information, and merge the first logistics information corresponding to the processed logistics information with the same content to obtain second logistics information.
[0017] Optionally, in a fifth implementation form of the second aspect of the present application, the third pushing module comprises: a second message generating unit configured to generate a second pushing message based on the second logistics information, the sender user ID and the receiver user ID; a control information generating unit configured to generate control information according to a preset message pushing format; and a second pushing unit configured to push the second pushing message and the control information to a life number in the WeChat client or a life number in the Alipay client.
[0018] The third aspect of the present application provides a device for sharing logistics information to a life number, comprising: a memory and at least one processor, the memory storing computer readable instructions, and the memory and the at least one processor being interconnected by a circuit; the at least one processor invoking the computer readable instructions in the memory to enable the device for sharing logistics information to a life number to perform each step of the method for sharing logistics information to a life number as described above.
[0019] The fourth aspect of the present application provides a computer readable storage medium storing computer readable instructions, which, when running on a computer, enables the computer to perform each step of the method for sharing logistics information to a life number as described above.
[0020] In the technical solution provided by the present application, the logistics order information is bound with the sender user ID and the receiver user ID, the order number of the logistics order information is pushed to the logistics service system based on Kafka, and after receiving the logistics information corresponding to the logistics order information returned by the logistics service system, the logistics order information and the logistics information are pushed to the information configuration system, the first logistics information after configuration is processed to obtain the second logistics information, and finally the second logistics information, the sender user ID and the receiver user ID are used to generate a second pushing message which is pushed to a life number in the WeChat client or a life number in the Alipay client, so as to be pushed to the sender and the receiver by the life number in the WeChat client or the life number in the Alipay client, thereby being able to provide quick and timely information notification and reminder, and further being able to improve the experience of customers on the service, and the method uses traffic for information intercommunication, thereby being able to reduce the cost of enterprise communication fees. BRIEF DESCRIPTION OF DRAWINGS
[0021] Figure 1 The first flowchart of the method for sharing logistics information to a life number provided by the embodiments of the present application;
[0022] Figure 2 The second flowchart of the method for sharing logistics information to a life number provided by the embodiments of the present application;
[0023] Figure 3This is a third flowchart of the method for sharing logistics information to a social networking service account provided in an embodiment of the present invention;
[0024] Figure 4 This is a fourth flowchart of the method for sharing logistics information to a social networking service account provided in this embodiment of the invention;
[0025] Figure 5 A fifth flowchart illustrating the method for sharing logistics information to a social networking service account, as provided in this embodiment of the invention.
[0026] Figure 6 A sixth flowchart illustrating the method for sharing logistics information to a social networking service account, as provided in this embodiment of the invention.
[0027] Figure 7 This is a schematic diagram of the device for sharing logistics information to a social networking service, as provided in an embodiment of the present invention.
[0028] Figure 8 A schematic diagram of the device for sharing logistics information to a life account as provided in an embodiment of the present invention. Detailed Implementation
[0029] This invention provides a method, apparatus, device, and storage medium for sharing logistics information to a WeChat or Alipay service account. The method pushes configured logistics information, sender's user ID, and recipient's user ID from a logistics order to a WeChat or Alipay service account, enabling the service account to send information to the sender and recipient. The method includes: acquiring logistics order information and obtaining the sender's and recipient's user IDs based on the acquired logistics order information; sending the order number of the logistics order information to a logistics service system based on the Kafka push logistics order information, and receiving logistics information corresponding to the logistics order information returned by the logistics service system; generating a first push message based on the logistics order information and the corresponding logistics information, and pushing the first push message to an information configuration system; receiving the configured first logistics information from the information configuration system, processing the first logistics information to obtain second logistics information; generating a second push message based on the second logistics information, the sender's user ID, and the recipient's user ID, and pushing the second push message to a WeChat or Alipay service account.
[0030] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” or “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] For ease of understanding, the specific process of the embodiments of the present invention is described below. Please refer to [link / reference]. Figure 1 The first embodiment of a method for sharing logistics information to a social networking service account according to the present invention includes:
[0032] S101. Obtain logistics order information, and obtain the sender's user ID and the recipient's user ID based on the obtained logistics order information.
[0033] It is understood that the executing entity of this invention can be a device for sharing logistics information to a social networking service, or it can be a terminal or a server; no specific limitation is made here. This embodiment of the invention will be described using a server as an example.
[0034] In this embodiment, logistics order information can be obtained from the logistics order center. Logistics order information generally includes the order generation time, order number, waybill number, sender's address information, sender's mobile phone number, recipient's address information, and recipient's mobile phone number. The sender's address information and recipient's address information are collectively referred to as order location information. Specifically, order location information includes province information, city information, and district / county information. Province information includes the province name and provincial postal code; city information includes the city name, city postal code, and the province to which it belongs; and district / county information includes the district / county name, district / county postal code, and the city to which it belongs. The province name, city name, and district / county name are all consistent with the naming conventions of national administrative divisions.
[0035] Understandably, logistics order information can also include a customer timeliness schedule. The customer timeliness schedule includes the province of origin, city of origin, province of destination, city of destination, district / county of destination, specified duration, and specified method. The specified duration is the time from pickup to receipt after the city of origin and city of destination are determined. If calculated in hours, it is the receipt time minus the pickup scanning time. If calculated in calendar days, it is 23:59:59 from the pickup date to the receipt date (i.e., N+1 days).
[0036] Understandably, a user ID, or identity identification number, also known as a serial number or account number, is a relatively unique code that identifies a user, essentially a kind of "identity card".
[0037] In this embodiment, the sender's user ID and the recipient's user ID can be obtained through mobile phone numbers. Generally, the user center database stores user mobile phone numbers and user IDs corresponding to those mobile phone numbers. Therefore, after obtaining the user's mobile phone number, the corresponding user ID can be extracted from the user center database.
[0038] S102. Based on Kafka, push the order number of the logistics order information to the logistics service system, and receive the logistics information corresponding to the logistics order information returned by the logistics service system.
[0039] In this implementation, Kafka is a high-throughput distributed publish-subscribe messaging system that can handle all action streams from consumers on a website. These actions (web browsing, searching, and other user actions) are a key element of many social functions on the modern web. This data is typically handled through log processing and log aggregation due to throughput requirements. For log data and offline analytics systems like Hadoop, but with the constraint of requiring real-time processing, this is a viable solution. Kafka aims to unify online and offline message processing through Hadoop's parallel loading mechanism, and also to provide real-time messaging through clustering.
[0040] In this embodiment, once the order number has logistics information, that is, after the order for the package with that order number is successfully placed, canceled, or the logistics information of a certain node is obtained by scanning, the logistics service system returns the logistics information corresponding to the logistics order information to the server based on the order number.
[0041] S103. Generate a first push message based on the logistics order information and the logistics information corresponding to the logistics order information, and push the first push message to the information configuration system.
[0042] In this embodiment, after receiving the first push message, the information configuration system configures the first push message according to a preset format, specifically including order message configuration, logistics update configuration, and pickup message configuration. The order message configuration content is shown in Table 1, the logistics update configuration content is shown in Table 2, and the pickup message configuration content is shown in Table 3.
[0043] Table 1 Order Message Configuration Content
[0044]
[0045] Table 2 Logistics Update Configuration Content
[0046]
[0047] Table 3. Package pickup message configuration content
[0048]
[0049] S104. Receive the first logistics information configured by the information configuration system, process the first logistics information, and obtain the second logistics information.
[0050] Understandably, the first logistics information configured by the information configuration system, as shown in the examples in Tables 1, 2, and 3 above, has its specific content configured by the information configuration system according to preset configuration rules, which can be set by the user.
[0051] In this embodiment, the second logistics message includes any of the following: order generation time, order number, waybill number, sender address information, sender's mobile phone number, recipient address information, recipient's mobile phone number, salesperson's contact information, salesperson's name, salesperson's branch information, and salesperson's branch address information, depending on the sending scenario.
[0052] It should be noted that sometimes when a shipment is large or heavy, it may be divided into several packages, each with its own tracking number. However, their logistics milestones are basically the same. Therefore, in order to avoid sending multiple messages to the same order information at the same time, the first logistics information that is different except for the tracking number can be merged at the same time point to obtain the second logistics information.
[0053] S105. Generate a second push message based on the second logistics information, the sender's user ID, and the recipient's user ID, and push the second push message to the WeChat client's Life Account or the Alipay client's Life Account.
[0054] Understandably, in order to identify users, each user will generate a secure user ID, namely OpenID, for each official account or mini-program. The official account or application can store this ID to facilitate the identification of the user's identity when logging in next time, or bind it to the user's original account in a third-party application as UnionId. UnionId is also a user identifier, but unlike OpenID, the same UnionId is assigned when the same WeChat user logs in to multiple mini-programs or official accounts under the same development entity.
[0055] To put it simply, if a user is a member of Wanda Plaza, then UnionId is the Wanda Plaza membership identifier for that user. If this user is a big shopper and has memberships in many stores within Wanda Plaza, then the membership number assigned to this user by each store is equivalent to OpenID. In short, within the same developer community, UnionId is unique, while OpenID is not necessarily unique.
[0056] In this embodiment, the "Life Accounts" in the WeChat client include WeChat Official Accounts and WeChat Mini Programs; the "Life Accounts" in the Alipay client include Alipay Official Accounts and Alipay Mini Programs.
[0057] It should be noted that the prerequisite for pushing the second push message to the Alipay app's "Life Account" is that the user has followed the Alipay official account or Alipay mini-program and logged into the Alipay official account or Alipay mini-program.
[0058] This embodiment provides a method for sharing logistics information to a WeChat or Alipay service account. It involves binding logistics order information with the sender's and recipient's user IDs, pushing the order number of the logistics order information to the logistics service system using a Kafka push mechanism, receiving the logistics information corresponding to the order information from the logistics service system, and then pushing this information along with the order information to an information configuration system. The configured first logistics information is then processed to obtain second logistics information. Finally, the second logistics information, the sender's and recipient's user IDs are used to generate a second push message, which is then pushed to the WeChat or Alipay service account. This allows the WeChat or Alipay service account to send information to the sender and recipient, providing fast and timely notifications and reminders, thereby improving the customer experience. Furthermore, this method utilizes data traffic for information exchange, reducing enterprise communication costs.
[0059] Please see Figure 2 A second embodiment of the method for sharing logistics information to a social networking service account in this invention includes:
[0060] S201. Obtain logistics order information and parse the logistics order information to obtain the sender's mobile phone number and the recipient's mobile phone number.
[0061] Specifically, this includes: acquiring logistics order information and parsing the logistics order information to obtain multiple order elements, wherein the order elements include order generation time, order number, waybill number, sender address information, sender's mobile phone number, recipient address information, and recipient's mobile phone number; extracting the multiple order elements according to a first preset field to obtain the sender's mobile phone number; and extracting the multiple order elements according to a second preset field to obtain the recipient's mobile phone number.
[0062] In this embodiment, the form of the parsing rules used to parse logistics order information is not limited. These rules can be a specially written order regular expression library configuration, created by collecting order information from various logistics companies to differentiate and display orders. In this embodiment, there are no restrictions on order elements; for example, they can include order generation time, order number, sender address information, sender's mobile phone number, recipient address information, recipient's mobile phone number, sent item information, sent weight, and sent item appearance information. Which order elements need to be parsed can be freely defined in the regular expression library.
[0063] In this embodiment, the first preset field is the sender's mobile phone number, and the specific sender's mobile phone number is extracted based on the "sender's mobile phone number" field. The second preset field is the recipient's mobile phone number, and the specific recipient's mobile phone number is extracted based on the "recipient's mobile phone number" field.
[0064] S202. Match the sender's mobile phone number with the mobile phone numbers in the user center database to obtain the sender's user ID, and synchronize the sender's user ID and sender's mobile phone number through Kafka.
[0065] S203. Match the recipient's mobile phone number with the mobile phone numbers in the user center database to obtain the recipient's user ID, and synchronize the recipient's user ID and recipient's mobile phone number through Kafka.
[0066] In this implementation, Kafka is a high-throughput distributed publish-subscribe messaging system that can handle all action streams from consumers on a website. These actions (web browsing, searching, and other user actions) are a key element of many social functions on the modern web. This data is typically handled through log processing and log aggregation due to throughput requirements. For log data and offline analytics systems like Hadoop, but with the constraint of requiring real-time processing, this is a viable solution. Kafka aims to unify online and offline message processing through Hadoop's parallel loading mechanism, and also to provide real-time messaging through clustering.
[0067] In this embodiment, by parsing the logistics order information, multiple order elements of the logistics order information are obtained. Then, the multiple order elements are extracted according to the first preset field and the second preset field to obtain the sender's mobile phone number and the recipient's mobile phone number. The acquisition method has high accuracy.
[0068] Please see Figure 3 A third embodiment of a method for sharing logistics information to a social networking service account, as described in this invention, includes:
[0069] S301. When a data storage instruction is received, the logistics order information is written to the Kafka message queue cluster.
[0070] Understandably, in this embodiment, the Kafka message queue is a common technology for exchanging data between distributed applications. Its data can be stored in memory or on disk, and messages stored in the message queue can be retained until they are read by the application. Through the Kafka message queue, applications can execute independently and asynchronously. The enqueue and dequeue speeds of the Kafka message queue can reach millisecond levels, and the message queue provides data buffering during peak logistics data periods.
[0071] S302. Summarize and store the written logistics order information by title.
[0072] As you can understand, Kafka includes producers and consumers. The sender of messages is called a Producer, and the user and receiver of messages are called Consumers. Producers save data to the Kafka cluster, and consumers retrieve messages from it for business processing. A topic (header) stores messages of the same type, which is equivalent to classifying messages. Each producer needs to specify which topic to store the message in when sending a message to Kafka, that is, to specify which category the message belongs to.
[0073] In other words, for each message, Kafka partitioned his log. Each partition consists of a series of ordered, immutable messages that are appended sequentially to the partition. Each message in a partition has a sequential number called the offset. The purpose of partitioning is to make each log entry small enough to be stored on a single service, and to allow each partition to be published and consumed independently.
[0074] S303: Call the order number of the logistics order information in the Kafka message queue and push it to the logistics service system.
[0075] S304. Send a logistics information query request based on the order number pushed to the logistics service system, and receive the logistics information returned by the logistics service system.
[0076] In this embodiment, after the logistics service system receives a logistics information query request from the server, it returns the logistics information to the server after updating the logistics information after the order number.
[0077] In this embodiment, leveraging the characteristics of Kafka message queues suitable for exchanging data between distributed applications, when a data storage instruction is received, logistics order information is written to the Kafka message queue cluster; the written logistics order information is summarized and stored by title; the order number of the logistics order information in the Kafka message queue is called and pushed to the logistics service system; a logistics information query request is sent based on the order number pushed to the logistics service system, and the logistics information returned by the logistics service system is received.
[0078] Please see Figure 4 A fourth embodiment of a method for sharing logistics information to a social networking service account, as described in this invention, includes:
[0079] S401. When a data storage instruction is received, the logistics information corresponding to the logistics order information is written to the Kafka message queue cluster.
[0080] Understandably, in this embodiment, the Kafka message queue is a common technology for exchanging data between distributed applications. Its data can be stored in memory or on disk, and messages stored in the message queue can be retained until they are read by the application. Through the Kafka message queue, applications can execute independently and asynchronously. The enqueue and dequeue speeds of the Kafka message queue can reach millisecond levels, and the message queue provides data buffering during peak logistics data periods.
[0081] S402. Summarize and store the logistics information corresponding to the logistics order information by title.
[0082] As you can understand, Kafka includes producers and consumers. The sender of messages is called a Producer, and the user and receiver of messages are called Consumers. Producers save data to the Kafka cluster, and consumers retrieve messages from it for business processing. A topic (header) stores messages of the same type, which is equivalent to classifying messages. Each producer needs to specify which topic to store the message in when sending a message to Kafka, that is, to specify which category the message belongs to.
[0083] In other words, for each message, Kafka partitioned his log. Each partition consists of a series of ordered, immutable messages that are appended sequentially to the partition. Each message in a partition has a sequential number called the offset. The purpose of partitioning is to make each log entry small enough to be stored on a single service, and to allow each partition to be published and consumed independently.
[0084] S403: Retrieve the logistics order information and the corresponding logistics information from the Kafka message queue to generate the first push message.
[0085] Understandably, after the first push message is generated, it can be validated. For example, the first push message can be extracted using multiple preset fields to determine whether it includes logistics order information and logistics information. For example, the multiple preset fields can include "order number", "waybill number", "acceptance", "cancellation", "signature", "delivery", etc.
[0086] In this embodiment, utilizing the characteristics of Kafka message queues, which are suitable for exchanging data between distributed applications, when a data storage instruction is received, logistics information is written to the cluster of Kafka message queues; the written logistics information is summarized and stored in units of titles; and the logistics order information and the corresponding logistics information in the Kafka message queue are called to generate a first push message.
[0087] Please see Figure 5 A fifth embodiment of a method for sharing logistics information to a social networking service account, as described in this invention, includes:
[0088] S501: Receive the first logistics information configured by the information configuration system and count the number of first logistics information within the same time node.
[0089] Understandably, the first logistics information configured by the information configuration system, as shown in the examples in Tables 1, 2, and 3 above, has its specific content configured by the information configuration system according to preset configuration rules, which can be set by the user.
[0090] When there are multiple tracking numbers for the same order number, if the logistics nodes of each tracking number are the same, then multiple first logistics information will be obtained at the same time node. Therefore, it is necessary to count the number of first logistics information at the same time node.
[0091] S502. If the first logistics information includes at least two items, then remove the waybill number of each item in the first logistics information to obtain the corresponding number of processed logistics information items.
[0092] Understandably, if the first logistics information includes at least two entries, it means that these two entries may be identical except for the waybill number. Therefore, the waybill number of each first logistics information entry can be removed, leaving the remaining content to obtain the corresponding number of processed logistics information entries. If there is only one first logistics information entry, it can be directly configured as the second logistics information entry.
[0093] S503. Compare all processed logistics information and merge the first logistics information corresponding to processed logistics information with the same content to obtain the second logistics information.
[0094] It should be noted that if there is more than one piece of processed logistics information, all processed logistics information needs to be compared, and the first logistics information corresponding to the processed logistics information with the same content needs to be merged to obtain the second logistics information.
[0095] For example, a logistics order with order number 9217430329889 was split into three packages, with tracking numbers 310229199380238, 310229199380239, and 310229199380240. When the package is in the delivery stage, the first push notification for package 310229199380238 will be: "Your package is about to be delivered, please rest assured; Tracking number: 310229199380238; Courier name: Zhang San; Courier phone number: 13838384729; Click on details to check the logistics status." The first push notification for package tracking number 310229199380239 is: Your package is about to be delivered, please rest assured; Tracking number: 310229199380239; Courier name: Zhang San; Courier phone number: 13838384729; Click for details to check the logistics status. The first push notification for package tracking number 310229199380240 is: Your package is about to be delivered, please rest assured; Tracking number: 310229199380240; Courier name: Zhang San; Courier phone number: 13838384729; Click for details to check the logistics status. Since the three first push messages are identical except for the tracking number, they can be merged to obtain the second logistics information. The second logistics information is: Your package is about to be delivered, please rest assured; Tracking numbers: 310229199380238, 310229199380239, 310229199380240; Courier name: Zhang San; Courier phone number: 13838384729; Click on details to check the logistics status.
[0096] This embodiment provides a method for sharing logistics information to a social media account. It can merge and combine first logistics information that differs only in waybill number at the same time point to obtain second logistics information. This can avoid pushing multiple messages to the same order information at the same time and improve the user experience.
[0097] Please see Figure 6 A sixth embodiment of a method for sharing logistics information to a social networking service account, as described in this invention, includes:
[0098] S601. Generate a second push message based on the second logistics information, the sender's user ID, and the recipient's user ID.
[0099] Understandably, in this embodiment, the second push message includes second logistics information, the sender's user ID, and the recipient's user ID. Furthermore, the second push message may also include other content, such as delivery requirements or time limits noted by the sender or recipient.
[0100] S602. Generate control information according to the preset message push format.
[0101] Administrators or users can set the message push format of the second push message as a preset format, such as setting the push message to be highlighted, bold, or blinking. After the administrator or user sets the push message format, the server will generate control information based on the push message format set by the administrator or user. This control information includes the push message format set by the administrator or user.
[0102] In the specific implementation process, control messages can be automatically generated according to the format of push messages set by the user, or control information can be generated based on the code information input by the user to set the push message format.
[0103] S603. Push the second push message and control information to the WeChat client's Life Account or the Alipay client's Life Account.
[0104] In this step, the server pushes the second push message and the control message together to the WeChat client's or Alipay client's official account. Upon receiving the control message, the WeChat or Alipay official account can configure the push message according to the required message format contained in the control message and then display the configured push message. More specifically, after receiving the control message, the WeChat or Alipay official account will rewrite the push interface format according to the control message. The push interface format includes the size of the push box, the push message display effect, etc. The terminal rewrites the push interface format to adapt to the user-configured push message format, thereby ensuring that the push message is displayed in the push interface according to the user-configured push message format.
[0105] This embodiment generates control messages using a preset message push format, and sends the control messages and the second push message to the terminal. The WeChat client's Life Account or the Alipay client's Life Account can change the display format of the push interface according to the format of the push message contained in the control information, so as to display the push message according to the push message format set by the user.
[0106] The method for sharing logistics information to the online service platform in this invention has been described above. The apparatus in this invention will be described below. Please refer to [link / reference]. Figure 7 The embodiments of the device for sharing logistics information to the life account in this invention include:
[0107] The acquisition module 701 is used to acquire logistics order information and obtain the sender's user ID and the recipient's user ID based on the acquired logistics order information;
[0108] The first push module 702 is used to push the order number of the logistics order information to the logistics service system based on Kafka, and to receive the logistics information corresponding to the logistics order information returned by the logistics service system.
[0109] The second push module 703 is used to generate a first push message based on the logistics order information and the logistics information corresponding to the logistics order information, and push the first push message to the information configuration system.
[0110] The processing module 704 is used to receive the first logistics information configured by the information configuration system and process the first logistics information to obtain the second logistics information.
[0111] The third push module 705 is used to generate a second push message based on the second logistics information, the sender's user ID and the recipient's user ID, and push the second push message to the WeChat client's Life Account or the Alipay client's Life Account.
[0112] In this embodiment, the acquisition module 701 includes: an acquisition unit 7011, used to acquire logistics order information and parse the logistics order information to obtain the sender's mobile phone number and the recipient's mobile phone number; a first matching unit 7012, used to match the sender's mobile phone number with the mobile phone numbers in the user center database to obtain the sender's user ID, and synchronize the sender's user ID and the sender's mobile phone number using Kafka; and a second matching unit 7013, used to match the recipient's mobile phone number with the mobile phone numbers in the user center database to obtain the recipient's user ID, and synchronize the recipient's user ID and the recipient's mobile phone number using Kafka.
[0113] In this embodiment, the first push module 702 includes: a first writing unit 7021, used to write logistics order information to the cluster of the Kafka message queue when a data storage instruction is received; a first storage unit 7022, used to summarize and store the written logistics order information by title; a first push unit 7023, used to call the order number of the logistics order information in the Kafka message queue and push it to the logistics service system; and a query request unit 7024, used to send a logistics information query request based on the order number pushed to the logistics service system and receive the logistics information returned by the logistics service system.
[0114] In this embodiment, the second push module 703 includes: a second writing unit 7031, used to write logistics information corresponding to logistics order information to the cluster of Kafka message queue when a data storage instruction is received; a second storage unit 7032, used to summarize and store the written logistics information corresponding to logistics order information in units of titles; and a first message generation unit 7033, used to call the logistics order information and the logistics information corresponding to the logistics order information in the Kafka message queue to generate a first push message.
[0115] In this embodiment, the processing module 704 includes: a statistics unit 7041, used to receive the first logistics information configured by the information configuration system and count the number of the first logistics information within the same time node; a first processing unit 7042, used to remove the waybill number of each first logistics information after determining that the first logistics information includes at least two items, to obtain the corresponding number of processed logistics information; and a second processing unit 7043, used to compare all processed logistics information and merge the first logistics information corresponding to processed logistics information with the same content to obtain the second logistics information.
[0116] In this embodiment, the third push module 705 includes: a second message generation unit 7051, used to generate a second push message based on the second logistics information, the sender's user ID, and the recipient's user ID; a control information generation unit 7052, used to generate control information according to a preset message push format; and a second push unit, used to push the second push message and control information to the WeChat client's Life Account or the Alipay client's Life Account.
[0117] In this embodiment, the device for sharing logistics information to the WeChat Official Account is used to bind logistics order information with the sender's user ID and the recipient's user ID. Based on Kafka, the order number of the logistics order information is pushed to the logistics service system. After receiving the logistics information corresponding to the logistics order information returned by the logistics service system, the device pushes the logistics order information and the logistics order information to the information configuration system. The configured first logistics information is then processed to obtain second logistics information. Finally, the second logistics information, the sender's user ID, and the recipient's user ID are used to generate a second push message, which is pushed to the WeChat Official Account or the Alipay Official Account. This allows the WeChat Official Account or the Alipay Official Account to push information to the sender and recipient, thereby providing fast and timely information notifications and reminders, which can improve the customer's service experience. Moreover, this method uses data traffic for information exchange, which can reduce the cost of enterprise communication.
[0118] above Figure 7 The device for sharing logistics information to the Life Account in this embodiment of the invention is described in detail from the perspective of modular functional entities. The device for sharing logistics information to the Life Account in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0119] Figure 8 This is a schematic diagram of a device 800 for sharing logistics information to a social networking service, as provided in an embodiment of the present invention. The device 800 can vary significantly due to different configurations or performance characteristics. It may include one or more central processing units (CPUs) 810 (e.g., one or more processors) and a memory 820, and one or more storage media 830 (e.g., one or more mass storage devices) for storing application programs 833 or data 832. The memory 820 and storage media 830 can be temporary or persistent storage. The program stored in the storage media 830 may include one or more modules (not shown), each module including a series of instruction operations on the device 800. Furthermore, the processor 810 may be configured to communicate with the storage media 830 and execute the series of instruction operations stored in the storage media on the device 800.
[0120] Device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input / output interfaces 860, and / or one or more operating systems 831, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc.
[0121] This invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores instructions that, when executed on a computer, cause the computer to perform the steps of a method for sharing logistics information to a life account.
[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system, device, or unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0123] If the integrated unit is implemented as 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 invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0124] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method of sharing logistics information to a life number, characterized by, The method comprises the following steps: Obtain logistics order information, and obtain a sender user ID and a receiver user ID based on the obtained logistics order information; Push the order number of the logistics order information to a logistics service system based on Kafka, and receive the logistics information corresponding to the logistics order information returned by the logistics service system; Generate a first push message based on the logistics order information and the logistics information corresponding to the logistics order information, and push the first push message to an information configuration system; Receive the first logistics information configured by the information configuration system, process the first logistics information, and obtain second logistics information; Generate a second push message based on the second logistics information, the sender user ID and the receiver user ID, and push the second push message to a life number in a WeChat client or a life number in an Alipay client; When there are multiple waybill numbers for the same order number, if the logistics nodes of each waybill number are consistent, then in the same time node, the first logistics information configured by the information configuration system has multiple pieces, and the receiving of the first logistics information configured by the information configuration system and the processing of the first logistics information to obtain the second logistics information comprises: receiving the first logistics information configured by the information configuration system, and counting the number of the first logistics information in the same time node; if the first logistics information includes at least two pieces, the waybill number of each piece of the first logistics information is removed one by one to obtain a corresponding number of processed logistics information; compare all the processed logistics information, and combine the first logistics information corresponding to the processed logistics information with the same content to obtain the second logistics information.
2. The method of claim 1, wherein, The obtaining of the logistics order information and the obtaining of the sender user ID and the receiver user ID based on the obtained logistics order information comprises: Obtain logistics order information, and parse the logistics order information to obtain a sender mobile phone number and a receiver mobile phone number; Match the sender mobile phone number with the mobile phone number in a user center database to obtain the sender user ID, and synchronize the sender user ID and the sender mobile phone number through Kafka; Match the receiver mobile phone number with the mobile phone number in the user center database to obtain the receiver user ID, and synchronize the receiver user ID and the receiver mobile phone number through Kafka.
3. The method of claim 2, wherein the life number is a number of a life insurance policy. The obtaining of the logistics order information and the parsing of the logistics order information to obtain the sender mobile phone number and the receiver mobile phone number comprises: Obtain logistics order information, and parse the logistics order information to obtain multiple order elements possessed by the logistics order information, wherein the order elements include order generation time, order number, waybill number, sender address information, sender mobile phone number, receiver address information and receiver mobile phone number; Extract the multiple order elements according to a first preset field to obtain the sender mobile phone number; Extract the multiple order elements according to a second preset field to obtain the receiver mobile phone number.
4. The method of claim 1, wherein, The order number of the logistics order information based on Kafka is pushed to a logistics service system, and logistics information corresponding to the logistics order information returned by the logistics service system is received, including: When receiving a data storage instruction, the logistics order information is written into a cluster of the Kafka message queue; The written logistics order information is stored in units of titles; The order number of the logistics order information in the Kafka message queue is called to be pushed to the logistics service system; Based on the order number pushed to the logistics service system, a logistics information query request is sent, and the logistics information returned by the logistics service system is received.
5. The method of claim 1, wherein, The first push message is generated based on the logistics order information and the logistics information corresponding to the logistics order information, and the first push message is pushed to an information configuration system, including: When receiving a data storage instruction, the logistics information corresponding to the logistics order information is written into a cluster of the Kafka message queue; The written logistics information corresponding to the logistics order information is stored in units of titles; The first push message is generated based on the logistics order information and the logistics information corresponding to the logistics order information.
6. The method of claim 1, wherein the life number is a number of a life insurance policy. The second push message is generated based on the second logistics information, the sender user ID and the recipient user ID, and the second push message is pushed to a life number in a WeChat client or a life number in an Alipay client: The second push message is generated based on the second logistics information, the sender user ID and the recipient user ID; The control information is generated according to a preset message push format; The second push message and the control information are pushed to the life number in the WeChat client or the life number in the Alipay client.
7. An apparatus for sharing logistics information to a life number, characterized by, Including: An acquisition module is configured to acquire logistics order information, and acquire a sender user ID and a recipient user ID based on the acquired logistics order information; A first push module is configured to push the order number of the logistics order information based on Kafka to a logistics service system, and receive logistics information corresponding to the logistics order information returned by the logistics service system; A second push module is configured to generate a first push message based on the logistics order information and the logistics information corresponding to the logistics order information, and push the first push message to an information configuration system; The processing module is configured to receive the first logistics information configured by the information configuration system and process the first logistics information to obtain second logistics information. When there are multiple waybill numbers for the same order number, if the logistics nodes of each waybill number are consistent, and there are multiple pieces of the first logistics information configured by the information configuration system in the same time node, the receiving the first logistics information configured by the information configuration system and processing the first logistics information to obtain the second logistics information comprises: receiving the first logistics information configured by the information configuration system and counting the number of the first logistics information in the same time node; if the first logistics information includes at least two pieces, removing the waybill number of each piece of the first logistics information one by one to obtain a corresponding number of processed logistics information; comparing all the processed logistics information, and merging the first logistics information corresponding to the processed logistics information with the same content to obtain the second logistics information. The third pushing module is configured to generate a second pushing message based on the second logistics information, the sender user ID and the receiver user ID, and push the second pushing message to a life number in the WeChat client or a life number in the Alipay client.
8. A device for sharing logistics information to a life number, characterized by, comprising a memory and at least one processor, the memory storing computer readable instructions; The at least one processor invokes the computer readable instructions in the memory to perform the steps of the method for sharing logistics information to a life number according to any one of claims 1-6.
9. A computer-readable storage medium having stored thereon computer-readable instructions, wherein, The computer readable instructions, when executed by the processor, implement the steps of the method for sharing logistics information to a life number according to any one of claims 1-6.
Citation Information
Patent Citations
Order data processing method, system and equipment based on kafka technology and storage medium
CN114707926A
Transaction distribution platform message notification method based on big data
CN114819848A