WO2023125672A1 - Platform message tracking method, system and apparatus, and storage medium - Google Patents

Platform message tracking method, system and apparatus, and storage medium Download PDF

Info

Publication number
WO2023125672A1
WO2023125672A1 PCT/CN2022/142863 CN2022142863W WO2023125672A1 WO 2023125672 A1 WO2023125672 A1 WO 2023125672A1 CN 2022142863 W CN2022142863 W CN 2022142863W WO 2023125672 A1 WO2023125672 A1 WO 2023125672A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
message tracking
task
preset
tracking
Prior art date
Application number
PCT/CN2022/142863
Other languages
French (fr)
Chinese (zh)
Inventor
李可
张峰
王世杰
丁霞
朱明�
Original Assignee
天翼物联科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天翼物联科技有限公司 filed Critical 天翼物联科技有限公司
Publication of WO2023125672A1 publication Critical patent/WO2023125672A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Definitions

  • the present application relates to the technical field of the Internet of Things, in particular to a platform message tracking method, system, device and storage medium.
  • the Internet of Things PaaS platform can be used for the data flow of reporting messages and issuing instructions between terminals and applications.
  • the Internet of Things PaaS platform is a black box for terminals and application developers, and data is stored between business modules of the Internet of Things PaaS platform.
  • the flow process is invisible, which increases the difficulty for third-party developers to analyze and locate problems, and the development efficiency is low.
  • the purpose of this application is to solve one of the technical problems existing in the prior art at least to a certain extent.
  • an object of the embodiment of the present application is to provide a platform message tracking method, which can track the uplink and downlink messages of the terminal device, which is conducive to improving development efficiency, and is conducive to improving development performance through asynchronous processing of messages.
  • Another object of the embodiments of the present application is to provide a platform message tracking system.
  • the embodiment of the present application provides a platform message tracking method, including the following steps:
  • the message tracking task of the device is created in the form of a ZNode node of zookeeper, and the preset device identifier of the device is written into the ZNode node;
  • the service node according to the preset device identification, query whether there is a ZNode node of the current device in the zookeeper, and judge whether message tracking is required; if message tracking is required, write the processing log message at the service node into the cache queue; read the processing log message from the cache queue, and write it into the database.
  • platform message tracking method may also have the following additional technical features:
  • the preset task creation strategy includes: if the device has a message tracking task, the message tracking task of the device cannot be created; or, if the number of message tracking tasks is greater than If the task quantity threshold is not preset, the message tracking task for the device cannot be created.
  • the method further includes: if the message tracking task of the device stops, deleting the ZNode of the device.
  • the message tracking task of the device judges whether to stop through the following steps: if the tracking status identifier of the device is a preset status ID, determine to stop the message tracking task of the device task; or, if a user's stop message tracking instruction is received, determine to stop the message tracking task of the device.
  • the method further includes: if an abnormality occurs at the service node, determining that the tracking status identifier of the current device is an abnormal status identifier, and interrupting the service flow.
  • reading the processing log message from the cache queue and writing it into the database includes: reading the processing log message from the cache queue, by In the form of relational data, write it into the database; or, read the processing log message from the cache queue, and write it into the database in the form of key-value data.
  • it also includes: acquiring the accumulated duration; if the accumulated duration is equal to the preset duration, deleting the data in the database whose storage duration is greater than or equal to the preset storage duration, and recalculating the accumulated duration.
  • a platform message tracking system including:
  • the message tracking task management module is used to create the message tracking task of the device in the form of the ZNode node of zookeeper according to the preset task creation strategy, and write the preset device identification of the device into the ZNode node; message tracking A module for, at the service node, querying whether there is a ZNode node of the current device in the zookeeper according to the preset device identifier, and judging whether message tracking is required; a message cache module, for when message tracking is required, Write the processing log message at the service node into a cache queue; the message record persistence module is used to read the processing log message from the cache queue and write it into a database.
  • an embodiment of the present application provides a platform message tracking device, including:
  • At least one memory for storing at least one program
  • the at least one processor When the at least one program is executed by the at least one processor, the at least one processor is made to implement any one of the above platform message tracking methods.
  • the embodiment of the present application provides a storage medium, which stores a processor-executable program, and the processor-executable program is used to implement any of the above-mentioned platform message tracking when executed by the processor. method.
  • the message tracking task of the device is created in the form of a ZNode node of zookeeper, and the preset device identifier of the device is written into the ZNode node ;
  • the service node according to the preset device identification, query whether there is a ZNode node of the current device in the zookeeper, and judge whether message tracking is required; if message tracking is required, process the log message at the service node Write into the cache queue; read the processing log message from the cache queue, and write it into the database.
  • Fig. 1 is a schematic flow chart of a specific embodiment of the platform message tracking method proposed by the present application
  • Fig. 2 is a schematic diagram of the reporting message tracking process in the platform message tracking method proposed by the present application
  • FIG. 3 is a schematic flow diagram of creating a message tracking task in the platform message tracking method proposed by the present application
  • FIG. 4 is a schematic flow chart of exception handling in the platform message tracking method proposed by the present application.
  • Fig. 5 is a schematic flow chart of tracking message persistence in the platform message tracking method proposed by the present application.
  • FIG. 6 is a schematic structural diagram of a specific embodiment of the platform message tracking system proposed by the present application.
  • FIG. 7 is a schematic structural diagram of a specific embodiment of a platform message tracking device proposed in this application.
  • the IoT PaaS platform connects to terminal devices in the south and connects to SaaS applications in the north, carrying the data flow of reporting messages and issuing instructions between terminals and applications.
  • the Internet of Things PaaS platform is a black box for terminals and application developers, and the process of data flow between various business modules of the Internet of Things PaaS platform is invisible. While the IoT platform reduces the coupling between terminals and applications, it also makes it difficult for third-party developers and users to analyze and locate problems when connecting to the IoT PaaS platform.
  • the message tracking technology can realize the unboxing of the data processing business process of the IoT device in the IoT PaaS platform, record and present the business flow of the device and the platform within a specified period of time, and facilitate developers to locate and view the interactive records of the platform, terminals and applications , improve development efficiency.
  • the principle of message tracking is to insert probes at key nodes of the business modules of the IoT platform, and record business status or data snapshots when data passes through these business nodes.
  • IoT platform is a single application, all business modules are in the same application, and the release of message tracking tasks and the reporting and storage of node data can all be completed through function calls in one application.
  • the business scenario of a high-performance IoT PaaS platform requires it to support millions of concurrent devices and tens of millions of devices online. Therefore, the Internet of Things platform mostly adopts the micro-service architecture and performs distributed deployment of multiple nodes to ensure the availability and stability of the business.
  • each main module is scattered in multiple microservice applications, and each microservice contains multiple instances.
  • the distributed message log recording method in the related art mainly focuses on the application system, and the business concerned is mainly the system operation log and the session log.
  • the logs generated by the service are collected into a unified storage space. 2.
  • Multiple sequential business node logs of the session are chained and tracked. The previous node will track the business number and business content and send them to the subsequent nodes to record the logs in turn.
  • an embodiment of the present application proposes a platform message tracking method and system.
  • the platform message tracking method proposed according to the embodiment of the present application will be described with reference to the accompanying drawings.
  • an embodiment of the present application provides a platform message tracking method.
  • the platform message tracking method in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be run on a terminal or a server software etc.
  • the terminal may be a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto.
  • the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate Cloud servers for basic cloud computing services such as software services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
  • the platform message tracking method in the embodiment of the present application mainly includes the following steps:
  • S101 According to the preset task creation policy, create the message tracking task of the device in the form of a zookeeper ZNode node, and write the preset device identifier of the device into the ZNode node;
  • the message tracking task of the device is created in the form of a zookeeper ZNode node, and the preset device identifier of the device is written into the ZNode node.
  • zookeeper is a distributed service framework, which is mainly used to solve some data management problems often encountered in distributed applications.
  • the message tracking task of the device is created as a zookeeper node, which can share real-time message tracking task status information among distributed microservices, and can provide distributed consistency and ensure the message tracking task status Consistency, able to support multi-instance deployment under the microservice architecture.
  • each message tracking task needs to be registered as a ZNode node of zookeeper.
  • the task ID, device ID, task status (tracking/stopping), start time, and planned end time are stored in the database, and the preset device identifier is written into the new zookeeper device node.
  • the preset device identifier is used to represent the identifier of the terminal device. It can be seen that the preset device identifier is unique and can be used to distinguish different terminal devices.
  • the preset device identifier may be a task ID, a device ID, or other identifiers that can distinguish terminal devices.
  • the preset task creation policy is used to characterize some conditions and restrictions that need to be considered when creating a message tracking task.
  • the zookeeper client calls the Curator Framework to create a permanent node ZNode, and the path value is spliced with the device ID on the message tracking path prefix (/tracker/device/). And insert a message tracking task record in the database, each task can only be started once.
  • S102 At the service node, according to the preset device identifier, query whether there is a ZNode node of the current device in the zookeeper, and determine whether message tracking is required;
  • this step in the process of business processing, at the business node, after the message tracking point of the business node is triggered, according to the preset device identifier, query whether there is a ZNode node of the current device in zookeeper, if there is a ZNode node of the current device in zookeeper , to determine that the terminal device needs to perform message tracking. That is, if there is a tracking task for the device, the data processing log of the node needs to be reported.
  • different service nodes in the data processing flow need to use the message tracker in the code for message tracking. After the current service node data processing is completed, the message tracking of the message tracker is triggered.
  • Task inspection and tracking record reporting function that is, by querying whether there is a ZNode node of the current device in zookeeper, it is judged whether the data generated by the node is transmitted to the subsequent process. Specifically, according to the incoming device ID, it is spliced with the prefix of the message tracking path to form a complete path, and the zookeeper client calls the Curator Framework interface to check whether the given complete path exists to determine whether message tracking is required.
  • the processing log messages at the service node are written into the cache queue.
  • the specified topic to write data into the message cache queue may include: task ID, device ID, processed message body, service node name, service status code, and time stamp.
  • the message tracking records from each business module of the distributed nodes are gathered in the message cache queue. Report the terminal device data logs that need to be tracked to the message cache queue through the log burying point in the business, realize the decoupling of business and storage, realize the asynchronous processing of log data persistence, and alleviate the performance bottleneck caused by a large number of concurrent I/O .
  • log messages are consumed and processed from the message queue, and stored in the database for query and display by the web service.
  • the process is: the processing log message tracking record in the message cache queue is consumed by the message data storage, the processing log message record is consumed under the topic specified by the message queue, and the task is parsed out according to the business model ID, device ID, message body, service node information, etc., the data storage writes message records into the database, realizing the persistence of message tracking records.
  • the preset task creation policy includes:
  • the message tracking task for the device cannot be created
  • the message tracking task of the device cannot be created.
  • the preset task creation strategy may be to limit each terminal device to have only one message tracking task, or it may be that the message tracking task data in the system is within a reasonable range. If the above limit is exceeded, message tracking tasks cannot be created.
  • the process is as follows: the user of the terminal device starts the message tracking task, and needs to first check whether the device already has an ongoing message tracking task, and set the message tracking task manager to complete the above checking work. Specifically, new tasks cannot be created if they exist. It is also necessary to check the maximum number of message tracking tasks for the current user, and refuse to add new tasks if the maximum number limit specified by the system is exceeded.
  • the node of the current device is deleted, which is beneficial to avoid unnecessary message tracking of the terminal device and save system resources.
  • the message tracking task of the device judges whether to stop through the following steps:
  • the tracking state identifier of the device is a preset status identifier, then determine to stop the message tracking task of the device;
  • the preset status identifier is used to represent the status of the message tracking task of the current device, which may be stopped or being created.
  • the preset state identifier can use numbers to represent specific states. For example, 1 means start and 0 means stop; characters can also be used to represent the state of the data graph. For example, start means start and stop means stop.
  • the message tracking task is stopped by selecting a preset state identification method.
  • the present application does not limit the specific expression form and specific meaning of the preset status identifier.
  • the message tracking task can also be stopped when the user needs it, that is, manually stop the message tracking task.
  • the user manually operates on the web page, the backend stops the message tracking task, updates the task status in the database to stop, deletes the zookeeper node of the device ID, and ends the message tracking task.
  • an abnormality occurs in the capture service node, it is determined that the tracking status of the current device is an abnormal status ID, and the system will perform fault location and fault analysis in abnormal situations according to the abnormal status ID, and interrupt the service flow at the same time. At the same time, if the exception is not caught, the data flow is interrupted at the node, and the system catches the exception. See Figure 4 for the specific process.
  • developers can quickly locate and troubleshoot possible problems in the process of terminal docking with the IoT PaaS platform by querying message tracking records.
  • reading the processing log message from the cache queue and writing it into the database includes:
  • the processing log message is written into the database, and different methods may be selected for the writing operation according to the characteristics of different data.
  • the underlying database can be a relational database (MySQL) or a NoSQL database (HBase).
  • Relational data should use auto-increment primary key, message tracking task ID and device ID as indexes.
  • Key-value databases such as HBase should use device ID-message task ID-time stamp concatenation as the key.
  • MySQL storage in order to control the overall size of the data, it is also necessary to implement a timer to regularly clean up expired data.
  • the cumulative duration is equal to the preset duration, delete the data in the database whose storage duration is greater than or equal to the preset storage duration, and recalculate the cumulative duration.
  • expired data will be processed by a timer, and a large amount of log data records will be generated for device message tracking, which will occupy a large amount of storage space, and outdated data needs to be cleaned up regularly.
  • the specific value of the preset storage period can be set according to the capacity of the database, the busyness of the system or the needs of customers.
  • the scheduled task periodically clears the message tracking records in the database according to the set data storage duration to save storage space.
  • users can also use the message tracking task ID, device ID, and service node to query message tracking records on the web page and display the data on the web page. You can check the message tracking record of the corresponding device according to the ongoing tasks in the message tracking task list.
  • the platform message tracking method provided by the present application can track the uplink and downlink messages of the terminal equipment, which is beneficial to improve the development efficiency, and the asynchronous processing of the messages is beneficial to improve the development performance.
  • Fig. 6 is a schematic structural diagram of a platform message tracking system according to an embodiment of the present application.
  • the system specifically includes:
  • the message tracking task management module 610 is used to create the message tracking task of the device in the form of a ZNode node of zookeeper according to the preset task creation strategy, and write the preset device identification of the device into the ZNode node;
  • the message tracking module 620 is configured to, at the service node, query whether there is a ZNode node of the current device in the zookeeper according to the preset device identifier, and determine whether message tracking is required;
  • the message cache module 630 is configured to write the processing log message at the service node into the cache queue when message tracking is required;
  • the message record persistence module 640 is configured to read the processing log message from the cache queue and write it into the database.
  • a platform message tracking device including:
  • At least one processor 710 At least one processor 710;
  • At least one memory 720 for storing at least one program
  • the at least one processor 710 When the at least one program is executed by the at least one processor 710, the at least one processor 710 is made to implement the platform message tracking method.
  • the content in the above-mentioned method embodiment is applicable to this device embodiment.
  • the functions realized by this device embodiment are the same as those of the above-mentioned method embodiment, and the beneficial effects achieved are the same as those achieved by the above-mentioned method embodiment. Also the same.
  • the functions/operations noted in the block diagrams may occur out of the order noted in the operational diagrams.
  • two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/operations involved.
  • the embodiments presented and described in the flowcharts of this application are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flow presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially or the part that contributes to the prior art or the 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 Several programs are used to make a computer device (which may be a personal computer, server, or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
  • a "computer-readable medium” may be any device that can contain, store, communicate, propagate, or transmit a program for use in or in conjunction with a program execution system, device, or device.
  • computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM).
  • the computer-readable medium may even be paper or other suitable medium on which the program can be printed, as it may be possible, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or other suitable processing if necessary.
  • the program is processed electronically and stored in computer memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Transfer Between Computers (AREA)
  • Debugging And Monitoring (AREA)

Abstract

A platform message tracking method, system and apparatus, and a storage medium. The method comprises: according to a preset task creation policy, creating a message tracking task of a device in the form of ZNode of ZooKeeper, and writing a preset device identifier of the device into ZNode; at a service node, querying, according to the preset device identifier, whether there is ZNode of the current device in ZooKeeper, and determining whether it is necessary to perform message tracking; if it is necessary to perform message tracking, writing a processing log message of the service node into a cache queue; and reading the log message from the cache queue, and then writing same into a database. The system comprises a message tracking task management module, a message tracking module, a message caching module and a message recording persistence module. By means of the method, uplink and downlink messages of a terminal device can be tracked, thereby facilitating an improvement in the efficiency of development; and asynchronous message processing is performed, thereby facilitating the improvement of the development performance.

Description

一种平台消息跟踪方法、系统、装置及存储介质A platform message tracking method, system, device and storage medium 技术领域technical field
本申请涉及物联网技术领域,尤其是一种平台消息跟踪方法、系统、装置及存储介质。The present application relates to the technical field of the Internet of Things, in particular to a platform message tracking method, system, device and storage medium.
背景技术Background technique
物联网PaaS平台,可用于终端与应用之间的上报消息与下发指令的数据流动,然而物联网PaaS平台对终端和应用开发者而言是黑盒,数据在物联网PaaS平台各业务模块间流动的过程是不可见的,这就增加了第三方开发者分析、定位问题的难度,开发效率低下。The Internet of Things PaaS platform can be used for the data flow of reporting messages and issuing instructions between terminals and applications. However, the Internet of Things PaaS platform is a black box for terminals and application developers, and data is stored between business modules of the Internet of Things PaaS platform. The flow process is invisible, which increases the difficulty for third-party developers to analyze and locate problems, and the development efficiency is low.
发明内容Contents of the invention
本申请的目的在于至少一定程度上解决现有技术中存在的技术问题之一。The purpose of this application is to solve one of the technical problems existing in the prior art at least to a certain extent.
为此,本申请实施例的一个目的在于提供一种平台消息跟踪方法,该方法能够对终端设备的上下行消息进行跟踪,有利于提升开发效率,通过消息的异步处理,有利于提升开发性能。Therefore, an object of the embodiment of the present application is to provide a platform message tracking method, which can track the uplink and downlink messages of the terminal device, which is conducive to improving development efficiency, and is conducive to improving development performance through asynchronous processing of messages.
本申请实施例的另一个目的在于提供一种平台消息跟踪系统。Another object of the embodiments of the present application is to provide a platform message tracking system.
为了达到上述技术目的,本申请实施例所采取的技术方案包括:In order to achieve the above technical objectives, the technical solutions adopted in the embodiments of the present application include:
一方面,本申请实施例提供了一种平台消息跟踪方法,包括以下步骤:On the one hand, the embodiment of the present application provides a platform message tracking method, including the following steps:
本申请实施例的平台消息跟踪方法,根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;若需要进行消息跟踪,将所述业务节点处的处理日志消息写入缓存队列中;从所述缓存队列中读取所述处理日志消息,写入数据库中。能够对终端设备的上下行消息进行跟踪,有利于提升开发效率,通过消息的异步处理,有利于提升开发性能。In the platform message tracking method of the embodiment of the present application, according to the preset task creation strategy, the message tracking task of the device is created in the form of a ZNode node of zookeeper, and the preset device identifier of the device is written into the ZNode node; At the service node, according to the preset device identification, query whether there is a ZNode node of the current device in the zookeeper, and judge whether message tracking is required; if message tracking is required, write the processing log message at the service node into the cache queue; read the processing log message from the cache queue, and write it into the database. Being able to track the uplink and downlink messages of terminal devices is beneficial to improve development efficiency, and the asynchronous processing of messages is beneficial to improve development performance.
另外,根据本申请上述实施例的平台消息跟踪方法,还可以具有以下附加的技术特征:In addition, the platform message tracking method according to the above-mentioned embodiments of the present application may also have the following additional technical features:
进一步地,本申请实施例的平台消息跟踪方法中,所述预设任务创建策略,包括:若设备存在消息跟踪任务,则无法创建所述设备的消息跟踪任务;或者,若消息跟踪任务数量大于预设任务数量阈值,则无法创建所述设备的消息跟踪任务。Further, in the platform message tracking method of the embodiment of the present application, the preset task creation strategy includes: if the device has a message tracking task, the message tracking task of the device cannot be created; or, if the number of message tracking tasks is greater than If the task quantity threshold is not preset, the message tracking task for the device cannot be created.
进一步地,在本申请的一个实施例中,还包括:若所述设备的消息跟踪任务停止,则删除所述设备的ZNode节点。Further, in an embodiment of the present application, the method further includes: if the message tracking task of the device stops, deleting the ZNode of the device.
进一步地,在本申请的一个实施例中,所述设备的消息跟踪任务,通过下列步骤判断是否停止:若所述设备的跟踪状态标识为预设状态标识,则确定停止所述设备的消息跟踪任务; 或者,若接收到用户的停止消息跟踪指令,则确定停止所述设备的消息跟踪任务。Further, in one embodiment of the present application, the message tracking task of the device judges whether to stop through the following steps: if the tracking status identifier of the device is a preset status ID, determine to stop the message tracking task of the device task; or, if a user's stop message tracking instruction is received, determine to stop the message tracking task of the device.
进一步地,在本申请的一个实施例中,还包括:若所述业务节点处发生异常,则确定当前设备的跟踪状态标识为异常状态标识,并中断业务流。Further, in an embodiment of the present application, the method further includes: if an abnormality occurs at the service node, determining that the tracking status identifier of the current device is an abnormal status identifier, and interrupting the service flow.
进一步地,在本申请的一个实施例中,所述从所述缓存队列中读取所述处理日志消息,写入数据库中,包括:从所述缓存队列中读取所述处理日志消息,通过关系型数据方式,写入数据库中;或者,从所述缓存队列中读取所述处理日志消息,通过键值数据方式,写入数据库中。Further, in an embodiment of the present application, reading the processing log message from the cache queue and writing it into the database includes: reading the processing log message from the cache queue, by In the form of relational data, write it into the database; or, read the processing log message from the cache queue, and write it into the database in the form of key-value data.
进一步地,在本申请的一个实施例中,还包括:获取累计时长;若累计时长等于预设时长,删除数据库中存储时长大于或者等于预设存储时长的数据,重新计算累计时长。Further, in one embodiment of the present application, it also includes: acquiring the accumulated duration; if the accumulated duration is equal to the preset duration, deleting the data in the database whose storage duration is greater than or equal to the preset storage duration, and recalculating the accumulated duration.
另一方面,本申请实施例提出了一种平台消息跟踪系统,包括:On the other hand, the embodiment of the present application proposes a platform message tracking system, including:
消息跟踪任务管理模块,用于根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;消息跟踪模块,用于在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;消息缓存模块,用于当需要进行消息跟踪时,将所述业务节点处的处理日志消息写入缓存队列中;消息记录持久化模块,用于从所述缓存队列中读取所述处理日志消息,写入数据库中。The message tracking task management module is used to create the message tracking task of the device in the form of the ZNode node of zookeeper according to the preset task creation strategy, and write the preset device identification of the device into the ZNode node; message tracking A module for, at the service node, querying whether there is a ZNode node of the current device in the zookeeper according to the preset device identifier, and judging whether message tracking is required; a message cache module, for when message tracking is required, Write the processing log message at the service node into a cache queue; the message record persistence module is used to read the processing log message from the cache queue and write it into a database.
另一方面,本申请实施例提供了一种平台消息跟踪装置,包括:On the other hand, an embodiment of the present application provides a platform message tracking device, including:
至少一个处理器;at least one processor;
至少一个存储器,用于存储至少一个程序;at least one memory for storing at least one program;
当所述至少一个程序被所述至少一个处理器执行时,使得所述至少一个处理器实现上述的任一种平台消息跟踪方法。When the at least one program is executed by the at least one processor, the at least one processor is made to implement any one of the above platform message tracking methods.
另一方面,本申请实施例提供了一种存储介质,其中存储有处理器可执行的程序,所述处理器可执行的程序在由处理器执行时用于实现上述的任一种平台消息跟踪方法。On the other hand, the embodiment of the present application provides a storage medium, which stores a processor-executable program, and the processor-executable program is used to implement any of the above-mentioned platform message tracking when executed by the processor. method.
本申请实施例中的平台消息跟踪方法,根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;若需要进行消息跟踪,将所述业务节点处的处理日志消息写入缓存队列中;从所述缓存队列中读取所述处理日志消息,写入数据库中。能够对终端设备的上下行消息进行跟踪,有利于提升开发效率,通过消息的异步处理,有利于提升开发性能。In the platform message tracking method in the embodiment of the present application, according to the preset task creation strategy, the message tracking task of the device is created in the form of a ZNode node of zookeeper, and the preset device identifier of the device is written into the ZNode node ; At the service node, according to the preset device identification, query whether there is a ZNode node of the current device in the zookeeper, and judge whether message tracking is required; if message tracking is required, process the log message at the service node Write into the cache queue; read the processing log message from the cache queue, and write it into the database. Being able to track the uplink and downlink messages of terminal devices is beneficial to improve development efficiency, and the asynchronous processing of messages is beneficial to improve development performance.
附图说明Description of drawings
为了更清楚地说明本申请实施例或者现有技术中的技术方案,下面对本申请实施例或者现有技术中的相关技术方案附图作以下介绍,应当理解的是,下面介绍中的附图仅仅为了方便清晰表述本申请的技术方案中的部分实施例,对于本领域的技术人员来说,在无需付出创造性劳动的前提下,还可以根据这些附图获取到其他附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings of the embodiments of the present application or the related technical solutions in the prior art are introduced below. It should be understood that the accompanying drawings in the following introduction are only In order to facilitate and clearly describe some embodiments of the technical solutions of the present application, those skilled in the art can also obtain other drawings based on these drawings without creative work.
图1为本申请提出的平台消息跟踪方法具体实施例的流程示意图;Fig. 1 is a schematic flow chart of a specific embodiment of the platform message tracking method proposed by the present application;
图2为本申请提出的平台消息跟踪方法中上报消息跟踪流程示意图;Fig. 2 is a schematic diagram of the reporting message tracking process in the platform message tracking method proposed by the present application;
图3为本申请提出的平台消息跟踪方法中创建消息跟踪任务的流程示意图;FIG. 3 is a schematic flow diagram of creating a message tracking task in the platform message tracking method proposed by the present application;
图4为本申请提出的平台消息跟踪方法中异常处理的流程示意图;FIG. 4 is a schematic flow chart of exception handling in the platform message tracking method proposed by the present application;
图5为本申请提出的平台消息跟踪方法中跟踪消息持久化的流程示意图;Fig. 5 is a schematic flow chart of tracking message persistence in the platform message tracking method proposed by the present application;
图6为本申请提出的平台消息跟踪系统具体实施例的结构示意图;FIG. 6 is a schematic structural diagram of a specific embodiment of the platform message tracking system proposed by the present application;
图7为本申请提出的平台消息跟踪装置具体实施例的结构示意图。FIG. 7 is a schematic structural diagram of a specific embodiment of a platform message tracking device proposed in this application.
具体实施方式Detailed ways
下面详细描述本申请的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,仅用于解释本申请,而不能理解为对本申请的限制。对于以下实施例中的步骤编号,其仅为了便于阐述说明而设置,对步骤之间的顺序不做任何限定,实施例中的各步骤的执行顺序均可根据本领域技术人员的理解来进行适应性调整。Embodiments of the present application are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary, are only for explaining the present application, and should not be construed as limiting the present application. For the step numbers in the following embodiments, it is only set for the convenience of illustration and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art sexual adjustment.
物联网PaaS平台,南向对接终端设备,北向对接SaaS应用,承载了终端与应用之间的上报消息与下发指令的数据流动。物联网PaaS平台对终端和应用开发者而言是黑盒,数据在物联网PaaS平台各业务模块间流动的过程是不可见的。物联网平台在降低终端和应用之间耦合的同时,也使第三方开发者用户对接物联网PaaS平台时,分析、定位问题存在一定的困难。The IoT PaaS platform connects to terminal devices in the south and connects to SaaS applications in the north, carrying the data flow of reporting messages and issuing instructions between terminals and applications. The Internet of Things PaaS platform is a black box for terminals and application developers, and the process of data flow between various business modules of the Internet of Things PaaS platform is invisible. While the IoT platform reduces the coupling between terminals and applications, it also makes it difficult for third-party developers and users to analyze and locate problems when connecting to the IoT PaaS platform.
消息跟踪技术可以实现物联网PaaS平台中对物联网设备的数据处理业务流程的开箱,记录并呈现指定时段内设备与平台的业务流,方便开发者定位、查看平台与终端和应用的交互记录,提升开发效率。The message tracking technology can realize the unboxing of the data processing business process of the IoT device in the IoT PaaS platform, record and present the business flow of the device and the platform within a specified period of time, and facilitate developers to locate and view the interactive records of the platform, terminals and applications , improve development efficiency.
消息跟踪的原理是在物联网平台的业务模块的关键节点插入探针,数据经过这些业务节点时记录业务状态或者数据快照等。物联网平台是单体应用时,所有业务模块都在同一个应用程序,消息跟踪任务的发布与节点数据的上报存储都可以在一个应用内通过函数调用完成。The principle of message tracking is to insert probes at key nodes of the business modules of the IoT platform, and record business status or data snapshots when data passes through these business nodes. When the IoT platform is a single application, all business modules are in the same application, and the release of message tracking tasks and the reporting and storage of node data can all be completed through function calls in one application.
高性能的物联网PaaS平台的业务场景要求它支持百万并发、千万设备在线。因而物联网平台多采用微服务架构,进行多节点的分布式部署,以保证业务的可用性和稳定性。在微服 务业务架构中,各主要模块分散在多个微服务应用中,每个微服务包含多个实例。相关技术中的分布式消息日志记录方法关注的对象主要对象是应用系统,关注的业务主要是系统运行日志和会话日志,实现的功能包括:1、分布式系统日志汇聚,将分布式部署的应用服务产生的日志汇集到统一的存储空间。2、会话的多个顺序的业务节点日志链式跟踪,前序节点将跟踪业务号、业务内容发送到后序节点依次记录日志。综上所述,保障终端消息能跨应用、分布式、多业务模块的跟踪记录是需要关注的问题。同时,对平台上的存量终端全部开启消息跟踪需要消耗海量存储资源,拖慢系统性能,因此还需要合理设置跟踪策略,降低成本。The business scenario of a high-performance IoT PaaS platform requires it to support millions of concurrent devices and tens of millions of devices online. Therefore, the Internet of Things platform mostly adopts the micro-service architecture and performs distributed deployment of multiple nodes to ensure the availability and stability of the business. In the microservice business architecture, each main module is scattered in multiple microservice applications, and each microservice contains multiple instances. The distributed message log recording method in the related art mainly focuses on the application system, and the business concerned is mainly the system operation log and the session log. The logs generated by the service are collected into a unified storage space. 2. Multiple sequential business node logs of the session are chained and tracked. The previous node will track the business number and business content and send them to the subsequent nodes to record the logs in turn. To sum up, ensuring that terminal messages can be tracked and recorded across applications, distributed, and multi-service modules is a problem that needs attention. At the same time, enabling message tracking for all existing terminals on the platform consumes massive storage resources and slows down system performance. Therefore, it is necessary to set reasonable tracking strategies to reduce costs.
对此,本申请实施例提出一种平台消息跟踪方法和系统,首先将参照附图描述根据本申请实施例提出的平台消息跟踪方法。In this regard, an embodiment of the present application proposes a platform message tracking method and system. First, the platform message tracking method proposed according to the embodiment of the present application will be described with reference to the accompanying drawings.
参照图1,本申请实施例中提供一种平台消息跟踪方法,本申请实施例中的平台消息跟踪方法,可应用于终端中,也可应用于服务器中,还可以是运行于终端或服务器中的软件等。终端可以是平板电脑、笔记本电脑、台式计算机等,但并不局限于此。服务器可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群或者分布式系统,还可以是提供云服务、云数据库、云计算、云函数、云存储、网络服务、云通信、中间件服务、域名服务、安全服务、CDN、以及大数据和人工智能平台等基础云计算服务的云服务器。本申请实施例中的平台消息跟踪方法主要包括以下步骤:Referring to FIG. 1 , an embodiment of the present application provides a platform message tracking method. The platform message tracking method in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be run on a terminal or a server software etc. The terminal may be a tablet computer, a notebook computer, a desktop computer, etc., but is not limited thereto. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or it can provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, intermediate Cloud servers for basic cloud computing services such as software services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The platform message tracking method in the embodiment of the present application mainly includes the following steps:
S101:根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;S101: According to the preset task creation policy, create the message tracking task of the device in the form of a zookeeper ZNode node, and write the preset device identifier of the device into the ZNode node;
本步骤中,根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将设备的预设设备标识写入所述ZNode节点。其中zookeeper,是一个分布式服务框架,主要是用来解决分布式应用中经常遇到的一些数据管理问题。本申请中,将设备的消息跟踪任务作为zookeeper的节点的形式进行创建,可在分布式部署的各个微服务间共享实时的消息跟踪任务状态信息,能够提供分布式一致性,保证消息跟踪任务状态的一致性,能够支撑微服务架构下多实例部署方式。具体地,每个消息跟踪任务都需要注册为zookeeper的一个ZNode节点。在一些可能的实施方式中,消息跟踪任务创建时,将任务ID、设备ID、任务状态(跟踪/停止)、启动时间、计划结束时间存储到数据库中,并将预设设备标识写入新的zookeeper设备节点。其中,预设设备标识用于表征终端设备的标识,由此可见,预设设备标识具有唯一性,可以用来区分不同的终端设备。可选地,对于上述参数,预设设备标识可以是任务ID,也可以是设备ID,还可以是其它可以区分终端设备的标识。预设任务创建策略用于表征消息跟踪任务创建时需要考虑的一些条件限制,可以是对消息跟踪任务类 型的限制,也可以是对消息跟踪任务的创建时间的限制,还可以是对消息跟踪任务创建时系统的任务量的限制。本申请并不限制预设设备标识和预设任务创建策略的具体内容。在一些可能的实施方式中,上述过程可以是:zookeeper客户端调用Curator Framework创建永久的节点ZNode,路径值为消息跟踪路径前缀(/tracker/device/)拼接上设备ID。并在数据库中插入一条消息跟踪任务记录,每个任务只能被启动一次。In this step, according to the preset task creation strategy, the message tracking task of the device is created in the form of a zookeeper ZNode node, and the preset device identifier of the device is written into the ZNode node. Among them, zookeeper is a distributed service framework, which is mainly used to solve some data management problems often encountered in distributed applications. In this application, the message tracking task of the device is created as a zookeeper node, which can share real-time message tracking task status information among distributed microservices, and can provide distributed consistency and ensure the message tracking task status Consistency, able to support multi-instance deployment under the microservice architecture. Specifically, each message tracking task needs to be registered as a ZNode node of zookeeper. In some possible implementations, when a message tracking task is created, the task ID, device ID, task status (tracking/stopping), start time, and planned end time are stored in the database, and the preset device identifier is written into the new zookeeper device node. Wherein, the preset device identifier is used to represent the identifier of the terminal device. It can be seen that the preset device identifier is unique and can be used to distinguish different terminal devices. Optionally, for the above parameters, the preset device identifier may be a task ID, a device ID, or other identifiers that can distinguish terminal devices. The preset task creation policy is used to characterize some conditions and restrictions that need to be considered when creating a message tracking task. It can be a limitation on the type of message tracking task, a limitation on the creation time of a message tracking task, or a limitation on the message tracking task The limit of the task volume of the system at the time of creation. This application does not limit the specific content of the preset device identification and preset task creation policy. In some possible implementations, the above process may be: the zookeeper client calls the Curator Framework to create a permanent node ZNode, and the path value is spliced with the device ID on the message tracking path prefix (/tracker/device/). And insert a message tracking task record in the database, each task can only be started once.
S102:在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;S102: At the service node, according to the preset device identifier, query whether there is a ZNode node of the current device in the zookeeper, and determine whether message tracking is required;
本步骤中,在业务处理过程中,在业务节点处,业务节点的消息跟踪点触发后,根据预设设备标识,查询zookeeper中是否存在当前设备的ZNode节点,如果zookeeper中存在当前设备的ZNode节点,判断该终端设备需要进行消息跟踪。即存在该设备的跟踪任务,则需要将该节点的数据处理日志上报。在一些可能的实施方式中,参见图2所示过程,数据处理流程中不同的业务节点需要在代码中使用消息跟踪器进行消息跟踪,当前业务节点数据处理完成后,触发消息跟踪器的消息跟踪任务检查和跟踪记录上报功能,即通过查询zookeeper中是否存在当前设备的ZNode节点,判断节点产生的数据是否向后续进程传输。具体地,根据传入的设备ID,与消息跟踪路径前缀拼接为完整路径,zookeeper客户端调用Curator Framework的接口检查给定的完整路径是否存在,用以判断是否需要进行消息跟踪。In this step, in the process of business processing, at the business node, after the message tracking point of the business node is triggered, according to the preset device identifier, query whether there is a ZNode node of the current device in zookeeper, if there is a ZNode node of the current device in zookeeper , to determine that the terminal device needs to perform message tracking. That is, if there is a tracking task for the device, the data processing log of the node needs to be reported. In some possible implementations, referring to the process shown in Figure 2, different service nodes in the data processing flow need to use the message tracker in the code for message tracking. After the current service node data processing is completed, the message tracking of the message tracker is triggered. Task inspection and tracking record reporting function, that is, by querying whether there is a ZNode node of the current device in zookeeper, it is judged whether the data generated by the node is transmitted to the subsequent process. Specifically, according to the incoming device ID, it is spliced with the prefix of the message tracking path to form a complete path, and the zookeeper client calls the Curator Framework interface to check whether the given complete path exists to determine whether message tracking is required.
S103:若需要进行消息跟踪,将所述业务节点处的处理日志消息写入缓存队列中;S103: If message tracking is required, write the processing log message at the service node into the cache queue;
本步骤中,若需要进行消息跟踪,将所述业务节点处的处理日志消息写入缓存队列中。具体地,使用指定的topic向消息缓存队列中写入数据,上报内容可以包括:任务ID、设备ID、处理后的消息体、业务节点名称、业务状态码、时间戳。来自分布式节点的各业务模块的消息跟踪记录汇聚在消息缓存队列。通过业务中的日志埋点上报需要进行跟踪的终端设备数据日志到消息缓存队列中,实现业务和存储器的解耦,实现日志数据持久化的异步处理,缓解大量并发I/O带来的性能瓶颈。In this step, if message tracking is required, the processing log messages at the service node are written into the cache queue. Specifically, use the specified topic to write data into the message cache queue, and the reported content may include: task ID, device ID, processed message body, service node name, service status code, and time stamp. The message tracking records from each business module of the distributed nodes are gathered in the message cache queue. Report the terminal device data logs that need to be tracked to the message cache queue through the log burying point in the business, realize the decoupling of business and storage, realize the asynchronous processing of log data persistence, and alleviate the performance bottleneck caused by a large number of concurrent I/O .
S104:从所述缓存队列中读取所述处理日志消息,写入数据库中。S104: Read the processing log message from the cache queue, and write it into a database.
本步骤中,从消息队列中消费处理日志消息,存储到数据库中,供web服务查询展示。在一些可能的实施方式中,该过程为:消息缓存队列中的处理日志消息跟踪记录由消息数据存储器消费,在指消息队列指定的topic下消费该条处理日志消息记录,根据业务模型解析出任务ID、设备ID、消息体、业务节点信息等,数据存储器将消息记录写入数据库,实现了消息跟踪记录的持久化。In this step, log messages are consumed and processed from the message queue, and stored in the database for query and display by the web service. In some possible implementations, the process is: the processing log message tracking record in the message cache queue is consumed by the message data storage, the processing log message record is consumed under the topic specified by the message queue, and the task is parsed out according to the business model ID, device ID, message body, service node information, etc., the data storage writes message records into the database, realizing the persistence of message tracking records.
可选地,本申请实施例中,所述预设任务创建策略,包括:Optionally, in this embodiment of the present application, the preset task creation policy includes:
若设备存在消息跟踪任务,则无法创建所述设备的消息跟踪任务;If there is a message tracking task for the device, the message tracking task for the device cannot be created;
或者,若消息跟踪任务数量大于预设任务数量阈值,则无法创建所述设备的消息跟踪任务。Or, if the number of message tracking tasks is greater than the preset task number threshold, the message tracking task of the device cannot be created.
本步骤中,预设任务创建策略,可以是限制每个终端设备只能有一个消息跟踪任务,也可以是系统中的消息跟踪任务数据在合理的范围内。若超出上述限制,则无法创建消息跟踪任务。在一些可能的实施方式中,参见图3所示,该过程为:终端设备用户启动消息跟踪任务,需要先检查该设备是否已经存在正在进行中的消息跟踪任务,设置消息跟踪任务管理器完成上述检查工作。具体地,若存在,则无法创建新任务。还需要检查当前用户的消息跟踪任务最大数量,若超过系统规定的最大数量限制则拒绝添加新任务。若均满足预设任务创建策略,则开启消息跟踪任务,以zookeeper的ZNode节点的形式进行创建。本领域技术人员可以理解的是,上述预设任务创建策略属于示例性的举例,实际使用过程中,可以选择其中一个作为预设创建策略,也可以选择其中两个作为预设创建策略,还可以根据实际需求,选择其它的测量作为预设任务创建策略。本申请并不限制预设任务创建策略的具体内容和具体策略数量。In this step, the preset task creation strategy may be to limit each terminal device to have only one message tracking task, or it may be that the message tracking task data in the system is within a reasonable range. If the above limit is exceeded, message tracking tasks cannot be created. In some possible implementations, as shown in FIG. 3 , the process is as follows: the user of the terminal device starts the message tracking task, and needs to first check whether the device already has an ongoing message tracking task, and set the message tracking task manager to complete the above checking work. Specifically, new tasks cannot be created if they exist. It is also necessary to check the maximum number of message tracking tasks for the current user, and refuse to add new tasks if the maximum number limit specified by the system is exceeded. If all meet the preset task creation policy, start the message tracking task and create it in the form of zookeeper's ZNode node. Those skilled in the art can understand that the above preset task creation strategies are exemplary examples. In actual use, one of them can be selected as the preset creation strategy, or two of them can be selected as the preset creation strategy, or According to actual needs, select other measurements as the preset task creation strategy. This application does not limit the specific content and the number of specific strategies for creating preset tasks.
可选地,本申请实施例中,还包括:若所述设备的消息跟踪任务停止,则删除所述设备的ZNode节点。Optionally, in the embodiment of the present application, further comprising: if the message tracking task of the device stops, deleting the ZNode of the device.
本步骤中,当前设备的消息跟踪任务停止后,删除当前设备的节点,有利于避免对终端设备进行不必要的消息跟踪,节省系统资源。In this step, after the message tracking task of the current device stops, the node of the current device is deleted, which is beneficial to avoid unnecessary message tracking of the terminal device and save system resources.
可选地,本申请实施例中,所述设备的消息跟踪任务,通过下列步骤判断是否停止:Optionally, in the embodiment of the present application, the message tracking task of the device judges whether to stop through the following steps:
若所述设备的跟踪状态标识为预设状态标识,则确定停止所述设备的消息跟踪任务;If the tracking state identifier of the device is a preset status identifier, then determine to stop the message tracking task of the device;
或者,若接收到用户的停止消息跟踪指令,则确定停止所述设备的消息跟踪任务。Alternatively, if an instruction to stop message tracking from the user is received, it is determined to stop the message tracking task of the device.
本步骤中,通过检查当前设备的跟踪状态标识,确定是否停止当前设备的消息跟踪任务。具体地,预设状态标识用于表征当前设备的消息跟踪任务的状态,可以是停止,也可以是创建中等。预设状态标识可以用数字表征具体的状态,示例性地,1表示开始,0表示停止;也可以用字符表征据图的状态,示例性地,start表示开始,stop表示停止。在一些可能的实施方式中,对于需要计划停止的消息跟踪任务,选择预设状态标识的方法进行消息跟踪任务的停止。示例性地,定时器每隔一定时间(示例性地,设定为5分钟)检查比对数据库中正在跟踪状态的消息跟踪任务是否过期,对已过期(示例性地,可以设定为:创建时间start+时长duration<=当前时间now)的任务,将对应的终端设备的跟踪状态标识标记为预设状态标识。本申请并不限定具体的预设状态标识的表现形式和具体含义。In this step, it is determined whether to stop the message tracking task of the current device by checking the tracking state identifier of the current device. Specifically, the preset status identifier is used to represent the status of the message tracking task of the current device, which may be stopped or being created. The preset state identifier can use numbers to represent specific states. For example, 1 means start and 0 means stop; characters can also be used to represent the state of the data graph. For example, start means start and stop means stop. In some possible implementation manners, for a message tracking task that needs to be stopped by plan, the message tracking task is stopped by selecting a preset state identification method. Exemplarily, the timer checks at regular intervals (exemplarily, set to 5 minutes) whether the message tracking task in the tracking state in the comparison database has expired, and if it has expired (exemplarily, it can be set to: For the task of time start+duration<=current time now), mark the tracking status identifier of the corresponding terminal device as the default status identifier. The present application does not limit the specific expression form and specific meaning of the preset status identifier.
同时,消息跟踪任务的停止还可以是在用户有需求的情况下进行,即手动停止消息跟踪任务。具体地,用户在web页面上手动操作,后端停止消息跟踪任务,更新数据库中任务状态为停止,删除该设备ID的zookeeper节点,结束消息跟踪任务。At the same time, the message tracking task can also be stopped when the user needs it, that is, manually stop the message tracking task. Specifically, the user manually operates on the web page, the backend stops the message tracking task, updates the task status in the database to stop, deletes the zookeeper node of the device ID, and ends the message tracking task.
可选地,本申请实施例中,还包括:若所述业务节点处发生异常,则确定当前设备的跟踪状态标识为异常状态标识,并中断业务流。Optionally, in the embodiment of the present application, further comprising: if an abnormality occurs at the service node, determining that the tracking status identifier of the current device is an abnormal status identifier, and interrupting the service flow.
本步骤中,若捕获业务节点发生异常,确定当前设备的跟踪状态标识为异常状态标识,系统会根据该异常状态标识进行异常情况下的故障定位和故障分析,同时中断业务流。同时,若没有捕获该异常,则数据流中断于该节点,由系统捕获异常。具体过程参见图4所示。通过设置异常状态标识,开发者通过查询消息跟踪记录,可以快速定位和排查终端对接物联网PaaS平台过程中可能出现的问题。In this step, if an abnormality occurs in the capture service node, it is determined that the tracking status of the current device is an abnormal status ID, and the system will perform fault location and fault analysis in abnormal situations according to the abnormal status ID, and interrupt the service flow at the same time. At the same time, if the exception is not caught, the data flow is interrupted at the node, and the system catches the exception. See Figure 4 for the specific process. By setting the abnormal status flag, developers can quickly locate and troubleshoot possible problems in the process of terminal docking with the IoT PaaS platform by querying message tracking records.
可选地,本申请实施例中,所述从所述缓存队列中读取所述处理日志消息,写入数据库中,包括:Optionally, in this embodiment of the present application, reading the processing log message from the cache queue and writing it into the database includes:
从所述缓存队列中读取所述处理日志消息,通过关系型数据方式,写入数据库中;Read the processing log message from the cache queue, and write it into the database in the form of relational data;
或者,从所述缓存队列中读取所述处理日志消息,通过键值数据方式,写入数据库中。Or, read the processing log message from the buffer queue, and write it into the database in the form of key-value data.
本步骤中,处理日志消息写入数据库中,可以根据不同数据的特点,选用不同的方式进行写入操作。具体地,参见图5所示,底层数据库可以选择关系型数据库(MySQL)或NoSQL型的数据库(HBase)。根据关系型和键值数据的特点,分别应使用不用的主键、查询条件。关系型数据应使用自增主键,消息跟踪任务ID和设备ID作为索引。键值型数据库如HBase应使用设备ID-消息任务ID-时间戳拼接为键。同时,使用MySQL存储时,为控制数据总体规模,还需要实现定时器,定时清理过期数据。使用HBase存储时,可在创建表时直接设置TTL,自动清理过期数据。In this step, the processing log message is written into the database, and different methods may be selected for the writing operation according to the characteristics of different data. Specifically, as shown in FIG. 5 , the underlying database can be a relational database (MySQL) or a NoSQL database (HBase). According to the characteristics of relational and key-value data, different primary keys and query conditions should be used respectively. Relational data should use auto-increment primary key, message tracking task ID and device ID as indexes. Key-value databases such as HBase should use device ID-message task ID-time stamp concatenation as the key. At the same time, when using MySQL storage, in order to control the overall size of the data, it is also necessary to implement a timer to regularly clean up expired data. When using HBase storage, you can directly set the TTL when creating a table to automatically clear expired data.
可选地,本申请实施例中,还包括:Optionally, in the embodiment of the present application, it also includes:
获取累计时长;Get the accumulated time;
若累计时长等于预设时长,删除数据库中存储时长大于或者等于预设存储时长的数据,重新计算累计时长。If the cumulative duration is equal to the preset duration, delete the data in the database whose storage duration is greater than or equal to the preset storage duration, and recalculate the cumulative duration.
本步骤中,定时器理过期数据,对设备消息跟踪会产生大量的日志数据记录,会占用大量的存储空间,需要定期清理过时的数据。在一些可能的实施例中,可以根据数据库的容量、系统的繁忙程度或者客户的需求,设定预设存储时长的具体数值。定时任务根据设定的数据存储时长,定期清理数据库中消息跟踪记录,节省存储空间。In this step, expired data will be processed by a timer, and a large amount of log data records will be generated for device message tracking, which will occupy a large amount of storage space, and outdated data needs to be cleaned up regularly. In some possible embodiments, the specific value of the preset storage period can be set according to the capacity of the database, the busyness of the system or the needs of customers. The scheduled task periodically clears the message tracking records in the database according to the set data storage duration to save storage space.
可选地,用户还可以使用消息跟踪任务ID、设备ID、业务节点在Web页面上查询消息 跟踪记录,在Web页面展示数据。可根据消息跟踪任务列表中正在进行的任务,查看对应设备的消息跟踪记录。Optionally, users can also use the message tracking task ID, device ID, and service node to query message tracking records on the web page and display the data on the web page. You can check the message tracking record of the corresponding device according to the ongoing tasks in the message tracking task list.
通过上述描述可知,本申请提供的一种平台消息跟踪方法,能够对终端设备的上下行消息进行跟踪,有利于提升开发效率,通过消息的异步处理,有利于提升开发性能。It can be seen from the above description that the platform message tracking method provided by the present application can track the uplink and downlink messages of the terminal equipment, which is beneficial to improve the development efficiency, and the asynchronous processing of the messages is beneficial to improve the development performance.
其次,参照附图描述根据本申请实施例提出的一种平台消息跟踪系统。Secondly, a platform message tracking system proposed according to an embodiment of the present application is described with reference to the accompanying drawings.
图6是本申请一个实施例的平台消息跟踪系统结构示意图。所述系统具体包括:Fig. 6 is a schematic structural diagram of a platform message tracking system according to an embodiment of the present application. The system specifically includes:
消息跟踪任务管理模块610,用于根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;The message tracking task management module 610 is used to create the message tracking task of the device in the form of a ZNode node of zookeeper according to the preset task creation strategy, and write the preset device identification of the device into the ZNode node;
消息跟踪模块620,用于在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;The message tracking module 620 is configured to, at the service node, query whether there is a ZNode node of the current device in the zookeeper according to the preset device identifier, and determine whether message tracking is required;
消息缓存模块630,用于当需要进行消息跟踪时,将所述业务节点处的处理日志消息写入缓存队列中;The message cache module 630 is configured to write the processing log message at the service node into the cache queue when message tracking is required;
消息记录持久化模块640,用于从所述缓存队列中读取所述处理日志消息,写入数据库中。The message record persistence module 640 is configured to read the processing log message from the cache queue and write it into the database.
可见,上述方法实施例中的内容均适用于本系统实施例中,本系统实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。It can be seen that the content in the above-mentioned method embodiments is applicable to this system embodiment, and the functions realized by this system embodiment are the same as those of the above-mentioned method embodiments, and the beneficial effects achieved are also the same as those achieved by the above-mentioned method embodiments. same.
参照图7,本申请实施例提供了一种平台消息跟踪装置,包括:Referring to Figure 7, the embodiment of the present application provides a platform message tracking device, including:
至少一个处理器710;at least one processor 710;
至少一个存储器720,用于存储至少一个程序;at least one memory 720 for storing at least one program;
当所述至少一个程序被所述至少一个处理器710执行时,使得所述至少一个处理器710实现所述的平台消息跟踪方法。When the at least one program is executed by the at least one processor 710, the at least one processor 710 is made to implement the platform message tracking method.
同理,上述方法实施例中的内容均适用于本装置实施例中,本装置实施例所具体实现的功能与上述方法实施例相同,并且达到的有益效果与上述方法实施例所达到的有益效果也相同。Similarly, the content in the above-mentioned method embodiment is applicable to this device embodiment. The functions realized by this device embodiment are the same as those of the above-mentioned method embodiment, and the beneficial effects achieved are the same as those achieved by the above-mentioned method embodiment. Also the same.
在一些可选择的实施例中,在方框图中提到的功能/操作可以不按照操作示图提到的顺序发生。例如,取决于所涉及的功能/操作,连续示出的两个方框实际上可以被大体上同时地执行或所述方框有时能以相反顺序被执行。此外,在本申请的流程图中所呈现和描述的实施例以示例的方式被提供,目的在于提供对技术更全面的理解。所公开的方法不限于本文所呈现 的操作和逻辑流程。可选择的实施例是可预期的,其中各种操作的顺序被改变以及其中被描述为较大操作的一部分的子操作被独立地执行。In some alternative implementations, the functions/operations noted in the block diagrams may occur out of the order noted in the operational diagrams. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may sometimes be executed in the reverse order, depending upon the functionality/operations involved. Furthermore, the embodiments presented and described in the flowcharts of this application are provided by way of example for the purpose of providing a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logical flow presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and in which sub-operations described as part of larger operations are performed independently.
此外,虽然在功能性模块的背景下描述了本申请,但应当理解的是,除非另有相反说明,功能和/或特征中的一个或多个可以被集成在单个物理装置和/或软件模块中,或者一个或多个功能和/或特征可以在单独的物理装置或软件模块中被实现。还可以理解的是,有关每个模块的实际实现的详细讨论对于理解本申请是不必要的。更确切地说,考虑到在本文中公开的装置中各种功能模块的属性、功能和内部关系的情况下,在工程师的常规技术内将会了解该模块的实际实现。因此,本领域技术人员运用普通技术就能够在无需过度试验的情况下实现在权利要求书中所阐明的本申请。还可以理解的是,所公开的特定概念仅仅是说明性的,并不意在限制本申请的范围,本申请的范围由所附权利要求书及其等同方案的全部范围来决定。Furthermore, although the present application has been described in the context of functional modules, it should be understood that one or more of the functions and/or features may be integrated into a single physical device and/or software module unless stated to the contrary. or one or more functions and/or features may be implemented in separate physical devices or software modules. It will also be appreciated that a detailed discussion of the actual implementation of each module is not necessary to understand this application. Rather, given the attributes, functions and internal relationships of the various functional blocks in the devices disclosed herein, the actual implementation of the blocks will be within the ordinary skill of the engineer. Accordingly, one skilled in the art using ordinary techniques can implement the present application set forth in the claims without undue experimentation. It is also to be understood that the particular concepts disclosed are illustrative only and are not intended to limit the scope of the application which is to be determined by the appended claims and their full scope of equivalents.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干程序用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the 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 Several programs are used to make a computer device (which may be a personal computer, server, or network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc., which can store program codes. .
在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行程序的定序列表,可以具体实现在任何计算机可读介质中,以供程序执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从程序执行系统、装置或设备取程序并执行程序的系统)使用,或结合这些程序执行系统、装置或设备而使用。就本说明书而言,“计算机可读介质”可以是任何可以包含、存储、通信、传播或传输程序以供程序执行系统、装置或设备或结合这些程序执行系统、装置或设备而使用的装置。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequential listing of executable programs for implementing logical functions, which can be embodied in any computer-readable medium, For use with program execution systems, devices, or equipment (such as computer-based systems, systems including processors, or other systems that can take programs from program execution systems, devices, or equipment and execute programs), or in combination with these program execution systems, devices or equipment for use. For purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate, or transmit a program for use in or in conjunction with a program execution system, device, or device.
计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印所述程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得所述程序,然后将其存储在计算机存储器中。More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program can be printed, as it may be possible, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or other suitable processing if necessary. The program is processed electronically and stored in computer memory.
应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施 方式中,多个步骤或方法可以用存储在存储器中且由合适的程序执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that each part of the present application may be realized by hardware, software, firmware or a combination thereof. In the above-described embodiments, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable program execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques known in the art: Discrete logic circuits, ASICs with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
在本说明书的上述描述中,参考术语“一个实施方式/实施例”、“另一实施方式/实施例”或“某些实施方式/实施例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。In the above description of this specification, the description with reference to the terms "one embodiment/example", "another embodiment/example" or "some embodiments/example" means that the description is described in conjunction with the embodiment or example. A specific feature, structure, material, or characteristic is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
尽管已经示出和描述了本申请的实施方式,本领域的普通技术人员可以理解:在不脱离本申请的原理和宗旨的情况下可以对这些实施方式进行多种变化、修改、替换和变型,本申请的范围由权利要求及其等同物限定。Although the embodiments of the present application have been shown and described, those skilled in the art can understand that various changes, modifications, substitutions and variations can be made to these embodiments without departing from the principle and spirit of the present application. The scope of the application is defined by the claims and their equivalents.
以上是对本申请的较佳实施进行了具体说明,但本申请并不限于所述实施例,熟悉本领域的技术人员在不违背本申请精神的前提下还可做出种种的等同变形或替换,这些等同的变形或替换均包含在本申请权利要求所限定的范围内。The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments, and those skilled in the art can also make various equivalent deformations or replacements without violating the spirit of the present application. These equivalent modifications or replacements are all within the scope defined by the claims of the present application.

Claims (10)

  1. 一种平台消息跟踪方法,其特征在于,包括以下步骤:A platform message tracking method is characterized in that it comprises the following steps:
    根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;According to the preset task creation strategy, the message tracking task of the device is created in the form of a ZNode node of zookeeper, and the preset device identification of the device is written into the ZNode node;
    在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;At the service node, according to the preset device identifier, query whether there is a ZNode node of the current device in the zookeeper, and determine whether message tracking is required;
    若需要进行消息跟踪,将所述业务节点处的处理日志消息写入缓存队列中;If message tracking is required, write the processing log message at the service node into the cache queue;
    从所述缓存队列中读取所述处理日志消息,写入数据库中。Read the processing log message from the cache queue, and write it into the database.
  2. 根据权利要求1所述的平台消息跟踪方法,其特征在于,所述预设任务创建策略,包括:The platform message tracking method according to claim 1, wherein the preset task creation strategy includes:
    若所述设备存在消息跟踪任务,则无法创建所述设备的消息跟踪任务;If there is a message tracking task for the device, the message tracking task for the device cannot be created;
    或者,若消息跟踪任务数量大于预设任务数量阈值,则无法创建所述设备的消息跟踪任务。Or, if the number of message tracking tasks is greater than the preset task number threshold, the message tracking task of the device cannot be created.
  3. 根据权利要求1所述的平台消息跟踪方法,其特征在于,所述方法还包括:The platform message tracking method according to claim 1, wherein the method further comprises:
    若所述设备的消息跟踪任务停止,则删除所述设备的ZNode节点。If the message tracking task of the device stops, the ZNode of the device is deleted.
  4. 根据权利要求3所述的平台消息跟踪方法,其特征在于,所述设备的消息跟踪任务,通过下列步骤判断是否停止:The platform message tracking method according to claim 3, wherein the message tracking task of the device judges whether to stop by the following steps:
    若所述设备的跟踪状态标识为预设状态标识,则确定停止所述设备的消息跟踪任务;If the tracking state identifier of the device is a preset status identifier, then determine to stop the message tracking task of the device;
    或者,若接收到用户的停止消息跟踪指令,则确定停止所述设备的消息跟踪任务。Alternatively, if an instruction to stop message tracking from the user is received, it is determined to stop the message tracking task of the device.
  5. 根据权利要求1所述的平台消息跟踪方法,其特征在于,所述方法还包括:The platform message tracking method according to claim 1, wherein the method further comprises:
    若所述业务节点处发生异常,则确定当前设备的跟踪状态标识为异常状态标识,并中断业务流。If an abnormality occurs at the service node, it is determined that the tracking status identifier of the current device is an abnormal status identifier, and the service flow is interrupted.
  6. 根据权利要求1所述的平台消息跟踪方法,其特征在于,所述从所述缓存队列中读取所述处理日志消息,写入数据库中,包括:The platform message tracking method according to claim 1, wherein said reading the processing log message from the cache queue and writing it into a database includes:
    从所述缓存队列中读取所述处理日志消息,通过关系型数据方式,写入数据库中;Read the processing log message from the cache queue, and write it into the database in the form of relational data;
    或者,从所述缓存队列中读取所述处理日志消息,通过键值数据方式,写入数据库中。Or, read the processing log message from the buffer queue, and write it into the database in the form of key-value data.
  7. 根据权利要求1所述的平台消息跟踪方法,其特征在于,所述方法还包括:The platform message tracking method according to claim 1, wherein the method further comprises:
    获取累计时长;Get the accumulated time;
    若累计时长等于预设时长,删除数据库中存储时长大于或者等于预设存储时长的数据,重新计算累计时长。If the cumulative duration is equal to the preset duration, delete the data in the database whose storage duration is greater than or equal to the preset storage duration, and recalculate the cumulative duration.
  8. 一种平台消息跟踪系统,其特征在于,包括:A platform message tracking system, characterized in that it includes:
    消息跟踪任务管理模块,用于根据预设任务创建策略,将设备的消息跟踪任务以zookeeper的ZNode节点的形式进行创建,并将所述设备的预设设备标识写入所述ZNode节点;The message tracking task management module is used to create the message tracking task of the device in the form of a ZNode node of zookeeper according to the preset task creation strategy, and write the preset device identification of the device into the ZNode node;
    消息跟踪模块,用于在业务节点处,根据所述预设设备标识,查询所述zookeeper中是否存在当前设备的ZNode节点,判断是否需要进行消息跟踪;The message tracking module is used to query whether there is a ZNode node of the current device in the zookeeper according to the preset device identifier at the service node, and determine whether message tracking is required;
    消息缓存模块,用于当需要进行消息跟踪时,将所述业务节点处的处理日志消息写入缓存队列中;A message cache module, configured to write the processing log message at the service node into the cache queue when message tracking is required;
    消息记录持久化模块,用于从所述缓存队列中读取所述处理日志消息,写入数据库中。The message record persistence module is used to read the processing log message from the cache queue and write it into the database.
  9. 一种平台消息跟踪装置,其特征在于,包括:A platform message tracking device is characterized in that it comprises:
    至少一个处理器;at least one processor;
    至少一个存储器,用于存储至少一个程序;at least one memory for storing at least one program;
    当所述至少一个程序被所述至少一个处理器执行,使得所述至少一个处理器实现如权利要求1-7中任一项所述的平台消息跟踪方法。When the at least one program is executed by the at least one processor, the at least one processor implements the platform message tracking method according to any one of claims 1-7.
  10. 一种计算机可读存储介质,其中存储有处理器可执行的程序,其特征在于:所述处理器可执行的程序在由处理器执行时用于实现如权利要求1-7中任一项所述的平台消息跟踪方法。A computer-readable storage medium, which stores a processor-executable program, wherein the processor-executable program is used to implement the program described in any one of claims 1-7 when executed by a processor. The platform message tracking method described above.
PCT/CN2022/142863 2021-12-30 2022-12-28 Platform message tracking method, system and apparatus, and storage medium WO2023125672A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111649407.3 2021-12-30
CN202111649407.3A CN114385674A (en) 2021-12-30 2021-12-30 Platform message tracking method, system, device and storage medium

Publications (1)

Publication Number Publication Date
WO2023125672A1 true WO2023125672A1 (en) 2023-07-06

Family

ID=81200831

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/142863 WO2023125672A1 (en) 2021-12-30 2022-12-28 Platform message tracking method, system and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN114385674A (en)
WO (1) WO2023125672A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114385674A (en) * 2021-12-30 2022-04-22 天翼物联科技有限公司 Platform message tracking method, system, device and storage medium
CN115550305B (en) * 2022-09-28 2024-03-01 深圳市凯迪仕智能科技股份有限公司 Equipment control method and related device
CN117891628B (en) * 2024-03-15 2024-05-28 山东乾云启创信息科技股份有限公司 Cloud management platform long-time task execution result tracking method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6083281A (en) * 1997-11-14 2000-07-04 Nortel Networks Corporation Process and apparatus for tracing software entities in a distributed system
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN109600375A (en) * 2018-12-13 2019-04-09 锐捷网络股份有限公司 Message tracing method, device, electronic equipment and storage medium
CN112910945A (en) * 2020-12-08 2021-06-04 江苏苏宁云计算有限公司 Request link tracking method and service request processing method
CN114385674A (en) * 2021-12-30 2022-04-22 天翼物联科技有限公司 Platform message tracking method, system, device and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6083281A (en) * 1997-11-14 2000-07-04 Nortel Networks Corporation Process and apparatus for tracing software entities in a distributed system
CN105224445A (en) * 2015-10-28 2016-01-06 北京汇商融通信息技术有限公司 Distributed tracking system
CN109600375A (en) * 2018-12-13 2019-04-09 锐捷网络股份有限公司 Message tracing method, device, electronic equipment and storage medium
CN112910945A (en) * 2020-12-08 2021-06-04 江苏苏宁云计算有限公司 Request link tracking method and service request processing method
CN114385674A (en) * 2021-12-30 2022-04-22 天翼物联科技有限公司 Platform message tracking method, system, device and storage medium

Also Published As

Publication number Publication date
CN114385674A (en) 2022-04-22

Similar Documents

Publication Publication Date Title
WO2023125672A1 (en) Platform message tracking method, system and apparatus, and storage medium
WO2019134226A1 (en) Log collection method, device, terminal apparatus, and storage medium
US9864517B2 (en) Actively responding to data storage traffic
US10684990B2 (en) Reconstructing distributed cached data for retrieval
Abad et al. A storage-centric analysis of mapreduce workloads: File popularity, temporal locality and arrival patterns
KR20180055952A (en) Data replication technique in database management system
WO2012045245A1 (en) Method and system for maintaining data consistency
US11580069B2 (en) Data subscription management system
KR102042230B1 (en) Synchronizing local and remote data
KR102529038B1 (en) Resource management and control method and device, device and storage medium
US20210216502A1 (en) System and method for synchronizing delete operations between primary and secondary databases
CN107800808A (en) A kind of data-storage system based on Hadoop framework
CN112685499B (en) Method, device and equipment for synchronizing flow data of working service flow
US9910881B1 (en) Maintaining versions of control plane data for a network-based service control plane
US10303678B2 (en) Application resiliency management using a database driver
Abad et al. Generating request streams on Big Data using clustered renewal processes
RU2665272C1 (en) Method and apparatus for restoring deduplicated data
US9893972B1 (en) Managing I/O requests
KR20190022600A (en) Data replication technique in database management system
US10248508B1 (en) Distributed data validation service
CN111741080A (en) Network file distribution method and device
CN115981559A (en) Distributed data storage method and device, electronic equipment and readable medium
CN117131080A (en) Data processing platform based on stream processing and message queue
US11340964B2 (en) Systems and methods for efficient management of advanced functions in software defined storage systems
Aguilera-Mendoza et al. Modeling and simulation of Hadoop Distributed File System in a cluster of workstations

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22914924

Country of ref document: EP

Kind code of ref document: A1