Business-related data reporting system, method and device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2021-12-28
- Publication Date
- 2026-08-07
AI Technical Summary
[0004]目前,一般通过客户端获取待上报至探测云平台的业务相关数据,并将获取得到的业务相关数据直接上报至探测云平台,这样,容易导致高峰阶段很快耗尽计算机资源,在空闲时又无法充分利用计算机资源,从而降低了业务相关数据上报的上报速率
[0046]上述业务相关数据上报系统、方法、装置、计算机设备、存储介质和计算机程序,通过对业务服务进行收听,可以得到业务相关数据,并基于批量的业务相关数据生成相应的数据上报请求。在服务端获取到数据上报请求时,通过确定服务集群中满足服务有效性的目标探测服务,可基于所确定的目标探测服务有效地接收批量业务相关数据,以提升批量业务相关数据的接收效率。通过确定批量业务相关数据中的每个业务相关数据各自对应的指标类型,可基于指标类型将业务相关数据缓存至对应的缓存队列,如此,便可基于分配的数据上报资源,对相同类型的业务相关数据进行批量的序列化处理,从而不仅降低了对不同类型的业务相关数据进行频繁序列化处理的概率,而且由于是对同类型的数据进行批量处理,还可以提升序列化处理的处理效率。通过对业务相关数据进行序列化处理,可得到紧凑的序列化结果,通过将紧凑的序列化结果缓存至全局发送队列,可基于数据上报资源对紧凑的序列化结果进行上报,从而降低了数据上报时所耗费的计算机资源。相比于传统的将获取得到的业务相关数据直接上报至云平台,本申请通过部署探测服务集群、缓存队列和全局发送队列,可基于探测服务集群、缓存队列和全局发送队列,将批量业务相关数据异步发送至云平台,从而减少了高峰阶段很快耗尽计算机资源,在空闲时又无法充分利用计算机资源的概率,进而提升了业务相关数据的上报速率。
Smart Images

Figure CN115373811B_ABST
Abstract
Description
[0001] This application claims priority to Chinese Patent Application No. 202110534607.8, filed on May 17, 2021, entitled "Business-Related Data Reporting System, Method and Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computer technology, and in particular to a business-related data reporting system, method and apparatus. Background Technology
[0003] With the development of science and technology, computer vision (CV) has a wide range of applications. For example, computer devices can use computer vision technology to process video streams captured by cameras to obtain relevant data, and then report the relevant data to the cloud platform for further processing based on the cloud platform.
[0004] Currently, business-related data to be reported to the detection cloud platform is generally obtained through the client and then directly reported to the detection cloud platform. This can easily lead to the rapid depletion of computer resources during peak periods, while computer resources cannot be fully utilized during idle periods, thus reducing the reporting rate of business-related data. Summary of the Invention
[0005] Therefore, it is necessary to provide a business-related data reporting system, method, device, and storage medium that can improve data reporting efficiency in response to the above-mentioned technical problems.
[0006] A business-related data reporting system includes a client and a server, wherein:
[0007] The client is used to listen to business services, obtain business-related data, and store the business-related data in a data queue.
[0008] The client is also configured to generate a data reporting request based on a batch of business-related data in the data queue when it is determined that the data queue meets the request generation conditions, and send the data reporting request to the server.
[0009] The server is used to receive batch business-related data corresponding to the data reporting request through a target detection service that meets service validity in the service cluster when a data reporting request is received; the batch business-related data is obtained based on data detection of the execution status of the target task;
[0010] The server is also used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data, and to distribute each piece of business-related data to a cache queue that matches the corresponding indicator type.
[0011] The server is also used to perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue, and obtain the corresponding serialization results.
[0012] The server is also configured to cache each of the serialization results to a global sending queue, and report the serialization results in the global sending queue based on the allocated data reporting resources.
[0013] A method for reporting business-related data, the method comprising:
[0014] Upon receiving a data reporting request, the service cluster receives batch business-related data corresponding to the data reporting request through a target probing service that meets service validity requirements. The batch business-related data is obtained based on data probing of the execution status of the target task.
[0015] Determine the corresponding indicator type for each piece of business-related data in the batch of business-related data;
[0016] Distribute the business-related data to the cache queues that match the corresponding metric types;
[0017] Based on the data processing resources allocated to each cache queue, the business-related data in each cache queue is processed in batch serialization to obtain the corresponding serialization results.
[0018] Each serialization result is cached in a global sending queue, and the serialization results in the global sending queue are reported based on the allocated data reporting resources.
[0019] A business-related data reporting device, the device comprising:
[0020] The batch data receiving module is used to receive batch business-related data corresponding to the data reporting request through the target detection service that meets the service validity in the service cluster when a data reporting request is received; the batch business-related data is obtained based on data detection of the execution status of the target task.
[0021] The serialization processing module is used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data; distribute each piece of business-related data to a cache queue that matches the corresponding indicator type; and perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue to obtain the corresponding serialization result.
[0022] The data reporting module is used to cache each of the serialization results to a global sending queue, and to report the serialization results in the global sending queue based on the allocated data reporting resources.
[0023] In one embodiment, the batch data receiving module further includes a service filtering module, which is used to filter out the detection services that are in a fault state from the service cluster when a data reporting request is received; select the detection services with a load less than a preset load threshold from the filtered detection services as target detection services; and forward the data reporting request to the target detection service so as to extract the batch business-related data in the data reporting request through the target detection service.
[0024] In one embodiment, the service filtering module is further configured to establish a heartbeat link with each probe service in the service cluster and send a heartbeat packet to the probe service through the heartbeat link; when no heartbeat packet is received from the probe service through the heartbeat link within a preset response period, the probe service is determined to be a probe service in a fault state.
[0025] In one embodiment, the batch data receiving module is further configured to query the target registration information of the target detection service through the central service when the target detection service is determined; wherein, the target registration information is the data sent by the target detection service to the central service for service registration when the target detection service registers with the central service; and through the central service, based on the target registration information, forward the data reporting request to the target detection service, so as to extract the batch business-related data in the data reporting request through the target detection service.
[0026] In one embodiment, the batch data receiving module is further configured to, upon receiving a data reporting request from a client, determine a target probe service in the service cluster that meets the service validity requirements; the data reporting request is generated by the client based on batch business-related data in the data queue when the client determines that the data queue used to store business-related data meets the request generation conditions; wherein, the business-related data stored in the data queue is stored by the client when it hears the business service generating business-related data. In one embodiment, the serialization processing module further includes an indicator type determination module, configured to, for each piece of business-related data in the batch business-related data, determine a target business service associated with the current business-related data; and determine the indicator type corresponding to the current business-related data based on the business type corresponding to the target business service.
[0027] In one embodiment, the serialization processing module is further configured to, for each of the multiple cache queues, extract at least one business-related data from the current cache queue when the current cache queue meets the batch data processing conditions; and perform serialization processing on the extracted at least one business-related data using the data processing resources allocated to the current cache queue to obtain the corresponding serialization result.
[0028] In one embodiment, the serialization processing module is further configured to determine the metric type corresponding to each cache queue; determine the data characteristics of the business-related data cached by each cache queue based on the metric type; and determine the data processing resources to be allocated to each cache queue based on the data characteristics of the business-related data cached by each cache queue; the data processing resources include a data processing thread group.
[0029] In one embodiment, the data reporting module is further configured to determine the reporting priority of the corresponding serialization result in the global sending queue according to the indicator type corresponding to each of the serialization results; and report the serialization result according to the reporting priority and based on the allocated data reporting resources.
[0030] In one embodiment, the business-related data reporting device is further configured to store the batch of business-related data in a database through the target detection service when the target detection service receives the batch of business-related data; and to perform data recovery based on the business-related data stored in the database when the detection service fails and loses the business-related data.
[0031] In one embodiment, the business-related data reporting device is further configured to determine the data reception result of the target detection service receiving the batch business-related data, and when the data reception result indicates reception failure, determine a first failure type of reception failure; the first failure type generates first callback information and returns the first callback information to the client; wherein, the first callback information is used to trigger the client to resend the data reporting request based on the first failure type; determine the processing result of the target detection service performing batch serialization processing on the business-related data in the cache queue, and when the processing result indicates processing failure, determine a second failure type of processing failure; generate second callback information according to the second failure type and return the second callback information to the client; wherein, the second callback information is used to trigger the client to resend the data reporting request based on the second failure type.
[0032] In one embodiment, the business-related data reporting device is further used to acquire business-related data, which is obtained by each business service through data detection of the execution status of the target task generated when managing the target site; the business service includes at least one of visual inspection service, business assistance service, and resource management service; the indicator type of the business-related data includes at least one of visual inspection indicator, task execution result indicator, resource call result indicator, and available resource indicator.
[0033] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps:
[0034] Upon receiving a data reporting request, the service cluster receives batch business-related data corresponding to the data reporting request through a target probing service that meets service validity requirements. The batch business-related data is obtained based on data probing of the execution status of the target task.
[0035] Determine the corresponding indicator type for each piece of business-related data in the batch of business-related data;
[0036] Distribute the business-related data to the cache queues that match the corresponding metric types;
[0037] Based on the data processing resources allocated to each cache queue, the business-related data in each cache queue is processed in batch serialization to obtain the corresponding serialization results.
[0038] Each serialization result is cached in a global sending queue, and the serialization results in the global sending queue are reported based on the allocated data reporting resources.
[0039] A computer-readable storage medium having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0040] Upon receiving a data reporting request, the service cluster receives batch business-related data corresponding to the data reporting request through a target probing service that meets service validity requirements. The batch business-related data is obtained based on data probing of the execution status of the target task.
[0041] Determine the corresponding indicator type for each piece of business-related data in the batch of business-related data;
[0042] Distribute the business-related data to the cache queues that match the corresponding metric types;
[0043] Based on the data processing resources allocated to each cache queue, the business-related data in each cache queue is processed in batch serialization to obtain the corresponding serialization results.
[0044] Each serialization result is cached in a global sending queue, and the serialization results in the global sending queue are reported based on the allocated data reporting resources.
[0045] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the following steps: upon receiving a data reporting request, receiving batch business-related data corresponding to the data reporting request through a target detection service that satisfies service validity in a service cluster; the batch business-related data is obtained based on data detection of the execution status of a target task; determining the indicator type corresponding to each business-related data in the batch business-related data; distributing each business-related data to a cache queue matching the corresponding indicator type; performing batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue to obtain corresponding serialization results; caching each serialization result to a global sending queue, and reporting the serialization results in the global sending queue based on the allocated data reporting resources.
[0046] The aforementioned business-related data reporting system, method, apparatus, computer equipment, storage medium, and computer program can obtain business-related data by listening to business services and generate corresponding data reporting requests based on batches of business-related data. When the server receives a data reporting request, it can effectively receive batches of business-related data by identifying target detection services in the service cluster that meet service validity requirements, thereby improving the efficiency of receiving batches of business-related data. By determining the corresponding indicator type for each piece of business-related data in the batch, the business-related data can be cached in the corresponding cache queue based on the indicator type. This allows for batch serialization processing of business-related data of the same type based on allocated data reporting resources. This not only reduces the probability of frequent serialization processing of different types of business-related data but also improves the processing efficiency of serialization processing because it involves batch processing of data of the same type. Serialization processing of business-related data yields compact serialization results. By caching these compact serialization results in a global sending queue, they can be reported based on data reporting resources, thereby reducing the computer resources consumed during data reporting. Compared to the traditional method of directly reporting acquired business-related data to the cloud platform, this application deploys a probe service cluster, a cache queue, and a global sending queue. Based on these, batches of business-related data can be asynchronously sent to the cloud platform, thereby reducing the probability of quickly exhausting computer resources during peak periods and failing to fully utilize computer resources during idle periods, thus improving the reporting rate of business-related data. Attached Figure Description
[0047] Figure 1 This is an application environment diagram of a business-related data reporting system in one embodiment;
[0048] Figure 2 This is a schematic diagram illustrating the recovery of business-related data in one embodiment;
[0049] Figure 3 This is a schematic diagram illustrating the reporting of serialization results based on a thread pool in one embodiment;
[0050] Figure 4 This is a schematic diagram of a routing data reporting request in one embodiment;
[0051] Figure 5 This is a schematic diagram of the batch serialization process in one embodiment;
[0052] Figure 6 This is a schematic diagram of the process of an asynchronous data reporting request from a client in one embodiment;
[0053] Figure 7This is a flowchart illustrating a business-related data reporting method in one embodiment;
[0054] Figure 8 This is a flowchart illustrating a business-related data reporting method in a specific embodiment.
[0055] Figure 9 This is a schematic diagram of the overall architecture of a business-related data reporting system in one embodiment;
[0056] Figure 10 This is a structural block diagram of a business-related data reporting device in one embodiment;
[0057] Figure 11 This is a structural block diagram of a business-related data reporting device in another embodiment;
[0058] Figure 12 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0059] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0060] Figure 1 This is an application environment diagram of a business-related data reporting system in one embodiment. (Refer to...) Figure 1The application environment diagram includes a video acquisition device 102, a business server 104, a computer cluster 106, and a cloud server 108. The video acquisition device 102 is used to acquire video streams within a target area, such as the video stream at a shopping mall entrance, and sends the acquired video streams to the business server 104 for processing. The business server 104 deploys clients and multiple different types of business services. These services provide business-related data of different indicator types; for example, clients can listen to visual inspection services to obtain visual indicator-type business-related data. Clients on the business server 104 can also send batches of business-related data to the computer cluster 106 (the server) when they are acquired. The computer cluster 106 then sends the batches of business-related data to the cloud server 108 via the central service 106-1 and the target detection service 106-2, according to the business-related data reporting method. The cloud server 108 runs a cloud platform for statistical analysis and graphical visualization of the batches of business-related data. In this application, the video acquisition device 102, the business server 104, and the computer cluster 106 can all be located within the same local area network. It can be understood that the client deployed on the business server in the above application environment diagram, and the server implemented through the computer cluster, together constitute the business-related data reporting system of this application.
[0061] The video acquisition device 102 can be a bullet camera, a PTZ camera, etc., and multiple devices can be deployed. The business server 104 can be implemented using a standalone server or a server cluster composed of multiple servers. The computer cluster 106 may include multiple computer devices, which can be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms, or they can be physical servers.
[0062] Cloud services can be implemented based on cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, network, and other resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term encompassing network technology, information technology, integration technology, management platform technology, and application technology applied to cloud computing business models. It can form resource pools, providing flexibility and convenience on demand. The backend services of a technical network system require substantial computing and storage resources. For example, in video quality inspection, video storage and artificial intelligence calculations are needed for different key video segments. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0063] Cloud computing refers to a delivery and usage model of Internet technology (IT) infrastructure, meaning obtaining necessary resources through a network in an on-demand and easily scalable manner. In a broader sense, cloud computing also refers to a service delivery and usage model, meaning obtaining necessary services through a network in an on-demand and easily scalable manner. These services can be IT and software related, Internet-related, or other services. Cloud computing is a product of the development and integration of traditional computer and network technologies such as grid computing, distributed computing, parallel computing, utility computing, network storage technologies, virtualization, and load balancing.
[0064] It should be noted that this application also relates to blockchain. Specifically, this application can store business-related data in a blockchain. Blockchain is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer.
[0065] In one embodiment, a business-related data reporting system includes a client and a server. The client is used to detect the execution status of a target task, obtain business-related data, and store the business-related data in a data queue. When it is determined that the data queue meets the request generation conditions, a data reporting request is generated based on the batch of business-related data in the data queue, and the data reporting request is sent to the server. The server, upon receiving a data reporting request, receives the batch of business-related data corresponding to the data reporting request through a target detection service in the service cluster that meets service validity requirements. The server is also used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data and distribute each piece of business-related data to a cache queue matching the corresponding indicator type. The server is also used to perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue to obtain the corresponding serialization results. The server is also used to cache each serialization result in a global sending queue and report the serialization results in the global sending queue based on the allocated data reporting resources.
[0066] The following sections will elaborate on the specific details of the data reporting method for business-related matters used jointly by the client and server in this application:
[0067] For the client, the execution status of the target task is monitored to obtain business-related data, which is then stored in a data queue. When the data queue meets the request generation conditions, a data reporting request is generated based on the batch of business-related data in the data queue, and the data reporting request is sent to the server.
[0068] Business-related data refers to data generated during the execution of a target task, which can be obtained by probing the execution status of the target task. Business-related data is obtained by listening to business services, which are services used to execute the target task and probe its execution status. For example, in a scenario of managing a target area, when the target task is to determine the number of animals entering the target area, a visual inspection service, a business processing service, and a resource management service can be deployed on the business server. The visual inspection service can cluster video streams, extract animal features, and determine animal movement trajectories. By listening to the visual inspection service, data such as animal detection boxes, animal features, and captured background images can be obtained. The business processing service can store animal movement trajectories and determine the number of animals entering the target area based on these trajectories. By listening to the business processing service, the number of animals entering the target area can be obtained. The resource management service can probe the computer resources of the business server and the number of calls to various interfaces. By listening to the resource management service, the number of interface calls and the remaining amount of computer resources can be obtained. Among them, the animal detection frame, animal characteristics, captured background image, number of animals entering the target area, number of interface calls, and remaining computer resources are the aforementioned business-related data.
[0069] It is easy to understand that a business server can be implemented using a standalone server or a business server cluster composed of multiple servers. When a business server is implemented using a business server cluster composed of multiple servers, multiple business services can be distributed across different servers. The server side can consist of a computer cluster, which refers to a group of independent computer nodes interconnected by a high-speed network. A central service and a service cluster are deployed on the computer cluster, with the service cluster including at least one probe service; that is, the server side includes a central service and a probe service. The central service refers to the service that manages the probe service, and the probe service refers to the service used to receive business-related data and send it to the cloud platform. It is easy to understand that different probe services can be deployed on different computer nodes or on the same computer node. The central service and the probe service can be deployed on the same computer node or on different computer nodes. This embodiment does not impose any limitations. Specifically, when a client listens to a business service and obtains business-related data, it can cache the business-related data in a data queue. The client determines in real time whether the data queue meets the request generation conditions. If the conditions are met, it extracts a batch of business-related data from the data queue, generates a data reporting request based on this batch of data, and sends the request to the central service. The central service then routes the data reporting request to the target detection service, which receives the batch of business-related data carried in the data reporting request. The request generation conditions can be freely configured according to requirements. For example, a data reporting request can be generated when the amount of data stored in the data queue reaches a preset threshold; alternatively, all cached business-related data in the data queue can be extracted at preset intervals, and a data reporting request can be generated based on this extracted data.
[0070] In one embodiment, a client can be deployed on the business server to obtain business-related data. When the business service executes a target task, the client can listen to the execution process of the business service and obtain business-related data. When the client determines that the business-related data obtained meets the conditions for batch data reporting, it can generate a corresponding data reporting request and send the data reporting request to the central service in the computer cluster, that is, report it to the server.
[0071] In one embodiment, when the data queue meets the request generation conditions, the client can extract batches of business-related data from the data queue and generate a data reporting request corresponding to each piece of business-related data. This data reporting request is then sent to the central service via multiple threads. When the central service receives the data reporting request sent by the multiple threads, it can select at least one target probing service from the service cluster to receive the data reporting request and route the data reporting request to the corresponding target probing service.
[0072] In the above embodiments, by sending business-related data in batches, the redundant data overhead caused by the transmission of individual business-related data can be reduced, and the throughput of the business-related data reporting system can be improved.
[0073] In one embodiment, when the business server is implemented through a business server cluster consisting of multiple servers, clients and corresponding business services can be deployed on each server, and the batch business-related data obtained by listening to the business services can be sent to the computer cluster through the deployed clients.
[0074] In one embodiment, a client can be set up for each business service. Each client can listen to the current business service, obtain relevant business-related data, and cache this data in a data queue. When the amount of cached business-related data in the data queue reaches a threshold, a sending thread generates a data reporting request based on the data in the queue and sends it to the computer cluster. A token bucket algorithm can be used to limit the amount of cached business-related data in the data queue. When the amount of cached business-related data reaches a preset threshold, the token bucket algorithm triggers the sending thread to extract a batch of business-related data from the data queue and report it. It is easy to understand that multiple clients can correspond to the same computer cluster, meaning that the target detection service in the same service cluster can receive batches of business-related data sent by multiple clients.
[0075] For the server, when it receives a data reporting request, it receives batch business-related data corresponding to the data reporting request through the target probing service that meets the service validity requirements in the service cluster; it determines the corresponding indicator type for each business-related data in the batch business-related data, and distributes each business-related data to a cache queue that matches the corresponding indicator type; based on the data processing resources allocated to each cache queue, it performs batch serialization processing on the business-related data in each cache queue to obtain the corresponding serialization results; it caches each serialization result in the global sending queue, and reports the serialization results in the global sending queue based on the allocated data reporting resources.
[0076] When the server receives a data reporting request, it receives batch business-related data corresponding to the data reporting request through the target detection service that meets the service validity in the service cluster.
[0077] When the central service in the server receives a data reporting request, it can identify the target detection service in the service cluster that meets the service validity requirements, and forward the data reporting request to the target detection service. The target detection service then receives the batch of business-related data carried in the data reporting request.
[0078] In one embodiment, when the central service receives a data reporting request, it can identify the target detection service in the service cluster that meets the service validity requirements, and determine the transmission address of the target detection service, such as the IP address and port number of the target detection service. The transmission address of the target detection service is then returned to the client, so that the client can send the batch business data to be transmitted to the target detection service according to the received transmission address.
[0079] In one embodiment, the data reporting request may carry batch business-related data and the amount of data related to the batch business. When the central service receives the data reporting request, it can determine the number of target probe services to be selected based on the data volume and the available resources of the computer nodes where the probe services reside in the service cluster. It can then select the target number of target probe services from the service cluster that meet the service validity requirements. For example, when the amount of batch business-related data is large, but the available resources of the computer nodes where the probe services reside in the service cluster are limited, a larger number of target probe services can be selected from the service cluster. Furthermore, the client can split the batch business-related data carried in the data reporting request according to the number of target services, obtaining at least one batch of sub-data, and distribute the batch of sub-data to the corresponding target probe services.
[0080] In one embodiment, the server is further configured to: when the target detection service receives batch business-related data, store the batch business-related data in the database through the target detection service; and when the detection service fails and loses business-related data, perform data recovery based on the business-related data stored in the database.
[0081] Specifically, when the target detection service on the server receives batch business-related data, it can back up and store the batch business-related data in the database so that if the target detection service loses business-related data due to a failure, the business-related data can be recovered based on the database.
[0082] In one embodiment, reference Figure 2 After receiving batch business-related data, the target detection service can cache the batch business-related data to a cache queue for reporting, and back up the batch business-related data to the database. Thus, if the target detection service loses the cached business-related data due to mid-process failure or restart, the lost business-related data can be read from the database. Figure 2 A schematic diagram illustrating the recovery of business-related data is shown in one embodiment.
[0083] In one embodiment, the target detection service can store business-related data in a database in the form of key-value pairs. The key can be a data identifier for the business-related data, and the value can be the specific data content of the business-related data.
[0084] In the above embodiments, compared to directly sending batch business-related data to the cloud platform, this embodiment can reduce the probability of data reporting failure due to loss of batch business-related data caused by target detection service failure by backing up the business-related data before sending it.
[0085] Furthermore, the server also determines the corresponding indicator type for each piece of business-related data in the batch of business-related data, and distributes each piece of business-related data to a cache queue matching the corresponding indicator type. Specifically, listening to business services of different business types yields business-related data of different indicator types. For example, in a target site scenario, the indicator type of business-related data obtained by listening to the visual inspection service can be a visual inspection indicator type, such as animal detection boxes. The indicator type of business-related data obtained by listening to the business auxiliary service can be a task execution result indicator type, such as the number of animals entering the target site. The indicator type of business-related data obtained by listening to the resource management service can be a resource call result indicator type and an available resource indicator type; for example, the number of interface calls is a resource call result indicator type, and the remaining computer resources are an available resource indicator type. It is easy to understand that this solution can also be used in smart retail scenarios. For example, it can be used to collect video streams in smart retail scenarios, parse the video streams, and obtain business-related data related to smart retail scenarios, such as human body detection boxes, human movement trajectories, and mall customer traffic.
[0086] Specifically, the business-related data carries type labels for metric types. When the target detection service on the server receives a batch of business-related data, it can extract the type labels from the data and determine the metric type of the corresponding data based on these labels. Once the target detection service identifies each piece of business-related data within the batch, it can cache each data point to a cache queue matching its corresponding metric type. For example, it can cache business-related data of the visual inspection metric type to the visual inspection metric queue, task execution result metric type to the visual inspection metric queue, resource call result metric type to the resource call result metric queue, and available resource metric type to the available resource metric queue. The cache queue can be a lock-free queue.
[0087] In one embodiment, during the process of listening to business services and generating business-related data, the client can generate type labels for corresponding indicator types based on the business type of the listened-to business service, and add the type labels to the listened-to business-related data. For example, a client listening to a visual inspection service can generate visual inspection indicator type labels and add them to the visual inspection data. The visual inspection data includes at least one of animal detection boxes, animal features, and captured background images.
[0088] In one embodiment, the target probing service can determine the corresponding metric type for each piece of business-related data in a batch of business-related data through a distributor. Here, the distributor refers to a thread used to determine the metric type corresponding to each piece of business-related data and distribute the business-related data to different cache queues according to the determined metric type. The distributor can be deployed in each probing service, for example, on the computer node where each probing service resides, or a distributor can be deployed for multiple probing services together, for example, on a computer node in a computer cluster other than the computer node where the probing service resides. When a distributor is deployed in a probing service, the target probing service can determine the corresponding metric type for each piece of business-related data by calling the distributor; when the distributor is deployed on a computer node other than the probing service, the target service can forward the received batch of business data to the computer node where the distributor resides, thus allowing the distributor to determine the corresponding metric type for each piece of business-related data.
[0089] In one embodiment, a cache queue group can be set up for each probe service in the service cluster, or multiple probe services can share a single cache queue group; this embodiment does not impose any limitations on this. Here, a cache queue group refers to a set of cache queues, with different cache queues within the set matched with different metric types.
[0090] In one embodiment, when a distributor is deployed in a computer cluster, the distributor can distribute business-related data to the corresponding cache queue according to the metric type of each business-related data.
[0091] In one embodiment, the server is further configured to determine the target business service associated with each piece of business-related data in the batch of business-related data; and to determine the indicator type corresponding to the current business-related data based on the business type corresponding to the target business service.
[0092] Specifically, for each piece of business-related data in the batch of business-related data, the target detection service in the server determines the target business service associated with the current business-related data and determines the business type corresponding to the target business service. Based on the correspondence between the business type and the indicator type, the indicator type corresponding to the current business-related data is determined. For example, when listening to a target business service that belongs to the visual detection type to obtain the current target business-related data, the indicator type of the current target business-related data can be the visual detection indicator type.
[0093] In one embodiment, when a business service generates business-related data, a business type tag can be added to the generated business-related data, so that the target detection service can determine the indicator type of the current business-related data based on the business type tag and the correspondence between business type and indicator type.
[0094] In the above embodiments, by identifying the target business service associated with the current business-related data, the indicator type corresponding to the current business-related data can be quickly determined based on the business type of the target business service.
[0095] Furthermore, the server also performs batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue, and obtains the corresponding serialization results.
[0096] Specifically, corresponding data processing resources can be allocated to each cache queue. For each of the multiple cache queues, when the current cache queue meets the batch data processing conditions, the server extracts at least one business-related data from the current cache queue. Based on the data processing resources allocated to the current cache queue, the extracted at least one business-related data is serialized to obtain a serialized result. Serialization refers to the process of converting structured data into a binary sequence. During the generation of structured data, memory padding is often required, resulting in large amounts of structured data and thus requiring significant network bandwidth for transmission. Therefore, to reduce network bandwidth costs, structured data can be serialized into a compact binary sequence, thereby reducing the probability of wasting transmission resources due to unnecessary data reporting.
[0097] In one embodiment, when it is determined that the number of business-related data stored in the cache queue reaches a business quantity threshold, the target detection service extracts the business-related data from the cache queue and performs serialization processing on the extracted business-related data to obtain the corresponding serialization result.
[0098] In one embodiment, before performing batch serialization processing on the business-related data in the cache queue, the target detection service can determine whether there is duplicate business-related data among the business-related data to be serialized. If so, the target detection service removes the duplicate business-related data and performs batch serialization processing on the non-duplicate business-related data.
[0099] In one embodiment, when the distributor is deployed in the probe service, a set of cache queues corresponding to each probe service and a processor corresponding to each cache queue can be deployed in the computer node, and corresponding data processing resources can be allocated to each processor, so that the processor can perform batch serialization processing on the business-related data in the corresponding cache queue based on the allocated data processing resources.
[0100] In one embodiment, when the distributor is deployed on a computer node in a computer cluster other than the computer node where the probe service resides, a set of cache queues and a corresponding processor for each cache queue can be deployed on the computer node where the distributor is deployed. The computer node where the distributor is deployed can allocate corresponding data processing resources to each processor, so that the processor can perform batch serialization processing on the business-related data in the corresponding cache queue based on the allocated data processing resources.
[0101] Furthermore, the server caches each serialization result in a global sending queue and reports the serialization results in the global sending queue based on the allocated data reporting resources.
[0102] Specifically, after the target detection service on the server obtains the serialization result, it can cache the serialization result in the global sending queue and report the serialization result in the global sending queue using the data reporting resources allocated to the global sending queue. The global sending queue can be a lock-free queue.
[0103] In one embodiment, a corresponding global sending queue can be set up for each probe service in the service cluster, and multiple probe services can also share a single global sending queue. This embodiment is not limited to this.
[0104] In one embodiment, when multiple probe services share a global sending queue, a global sending queue can be set up in a computer cluster. The target probe service can then send the serialization result to the target computer node where the global sending queue resides, allowing the target computer node to cache the serialization result in the global sending queue. The target computer node can allocate data reporting resources to the global sending queue and report the serialization result in the global sending queue based on these resources. The global sending queue may reside on the same computer node as the target probe service, or it may reside on a different computer node.
[0105] In one embodiment, the data reporting resource can specifically be threads in a thread pool. When data reporting is required, the target detection service can dynamically request multiple threads from the thread pool based on the amount of data to be reported, thus enabling multi-threaded reporting. By deploying a thread pool, thread resources can be fully utilized based on a dynamic thread scheduling mechanism, thereby significantly improving the reporting rate of serialization results and ultimately enhancing the overall performance of the business-related data reporting system.
[0106] In one embodiment, reference Figure 3 When receiving business-related data obtained from listening to various business services, such as visual inspection services, business support services, and resource management services, the target detection service caches the data into corresponding cache queues based on the data's metric type. For example, business-related data of the visual inspection metric type is cached in the visual inspection metric queue, and business-related data of the task execution result metric type is cached in the task execution result metric queue. The target detection service then uses the data processing resources corresponding to each cache queue to perform batch serialization processing on the business-related data, obtaining serialization results. These serialization results are then cached in a global sending queue, allowing the serialization results in the global sending queue to be reported to the cloud platform via multi-threaded execution in a thread pool. Figure 3 A schematic diagram is shown in one embodiment of reporting serialization results based on a thread pool.
[0107] In the aforementioned business-related data reporting system, business-related data can be obtained by listening to business services, and corresponding data reporting requests can be generated based on batches of business-related data. When the server receives a data reporting request, it can effectively receive batches of business-related data by identifying target probe services in the service cluster that meet service validity requirements, thereby improving the efficiency of receiving batches of business-related data. By determining the corresponding indicator type for each piece of business-related data in the batch, the business-related data can be cached in the corresponding cache queue based on the indicator type. In this way, based on the allocated data reporting resources, batch serialization processing of business-related data of the same type can be performed. This not only reduces the probability of frequent serialization processing of different types of business-related data, but also improves the processing efficiency of serialization processing because it is batch processing of data of the same type. By serializing business-related data, a compact serialization result can be obtained. By caching the compact serialization result in a global sending queue, the compact serialization result can be reported based on the data reporting resources, thereby reducing the computer resources consumed during data reporting. Compared to the traditional method of directly reporting acquired business-related data to the cloud platform, this application deploys a probe service cluster, a cache queue, and a global sending queue. Based on these, batches of business-related data can be asynchronously sent to the cloud platform, thereby reducing the probability of quickly exhausting computer resources during peak periods and failing to fully utilize computer resources during idle periods, thus improving the reporting rate of business-related data.
[0108] Furthermore, by deploying a server-side component, the cloud platform's reporting logic can be shielded, reducing the probability of the cloud platform being directly exposed to the external network and thus significantly improving its security. Moreover, by sending batches of business-related data to the service cluster, compared to the traditional approach of clients synchronously reporting individual business-related data via a single thread, this application not only avoids the bottleneck of single-threaded sending but also reduces the number of times clients report business-related data, thereby improving the overall performance of business-related data reporting.
[0109] In one embodiment, the server includes a central service and a service cluster. The service cluster includes at least one probe service. The central service of the server is further configured to: when a data reporting request is received, filter out probe services that are in a faulty state from the service cluster; select probe services with a load less than a preset load threshold from the filtered probe services as target probe services; and forward the data reporting request to the target probe service so as to extract batch business-related data from the data reporting request through the target probe service.
[0110] Specifically, when the central service on the server side receives a data reporting request from the client, it filters out the probe services in a faulty state in the service cluster to identify the probe services in a normal state. The central service determines the load status of each probe service in a normal state, such as the load status of the computer node where each probe service in a normal state resides, and selects the target probe service from the probe services in a normal state based on load balancing conditions.
[0111] In one embodiment, the central service may filter out the target detection services with the lowest load from the detection services in a normal state. For example, the central service may filter out two target detection services with the lowest load from the detection services in a normal state.
[0112] In the above embodiments, by filtering out probe services that are in a faulty state from the service cluster, the probability of batch business-related data reception failure due to target probe service failure can be reduced. By selecting probe services with a load lower than a preset load threshold from the filtered probe services as target probe services, the load corresponding to each probe service in the service cluster can be balanced, thereby improving the overall performance of the service cluster.
[0113] In one embodiment, the central service on the server side is further configured to: establish a heartbeat link with each probe service in the service cluster, and send a heartbeat packet to the probe service through the heartbeat link; when no heartbeat packet is received from the probe service through the heartbeat link within a preset response period, the probe service is determined to be a probe service in a faulty state.
[0114] Specifically, when a probe service on the server successfully registers with the central service, the central service can establish a heartbeat link with the successfully registered probe service in the service cluster, and periodically send heartbeat packets to the probe service through the heartbeat link to update the probe service's status periodically. When the probe service returns a heartbeat packet to the central service within a preset response period, the central service determines that the probe service is in a normal state; when no heartbeat packet is received from the probe service within the preset response period, the central service determines that the probe service is in a fault state.
[0115] In one embodiment, multiple central services can be deployed in a computer cluster, and each central service can periodically synchronize the status of each probe service.
[0116] In one embodiment, reference Figure 4Since the amount of business-related data to be reported is generally large, multiple central services and service clusters can be deployed in the computer cluster during initialization. This allows the detection services in the service clusters to register with the central services, and the central services can periodically synchronize information. The central services periodically send heartbeat packets to the detection services to filter out faulty detection services and route data reporting requests to target detection services that are in normal condition and have low load. Figure 4 A schematic diagram of a routing data reporting request is shown in one embodiment.
[0117] In the above embodiments, by periodically sending heartbeat packets, the status of the probe service can be determined in real time. Based on the real-time determined status, data reporting requests can be routed to the target probe service in a normal state, thereby improving the success rate of receiving batch business processing data.
[0118] In one embodiment, the central service on the server side is further configured to: when a target detection service is identified, query the target registration information of the target detection service; wherein, the target registration information is the data sent by the target detection service to the central service for service registration when it registers with the central service; and forward the data reporting request to the target detection service based on the target registration information, so as to extract batch business-related data in the data reporting request through the target detection service.
[0119] Specifically, when a probe service needs to be added to a service cluster, the probe service on the server side can obtain its own registration information and send the registration information to the central service to complete service registration. This registration information includes, but is not limited to, port number, IP address, runtime ID, and available resources.
[0120] When a target detection service that has completed service registration is selected from the service cluster, the central service can extract the target registration information of the target detection service and forward the data reporting request to the target detection service based on the target registration information. For example, the central service can route the data reporting request to the target detection service through the port number and IP address in the target registration information, so that the target detection service can extract batch business-related data from the data reporting request.
[0121] In one embodiment, when the target registration information of the target detection service is not stored in the current central service, the current central service may initiate an information synchronization request to synchronize information with other central services and search for the target registration information corresponding to the target detection service from the synchronized information.
[0122] In the above embodiments, by performing service registration, data reporting requests can be routed to the corresponding target detection service based on the service registration information, thereby enabling the reception of batch business-related data based on the target detection service.
[0123] In one embodiment, the server is further configured to: for each of the multiple cache queues, when the current cache queue meets the batch data processing conditions, extract at least one business-related data from the current cache queue; and use the data processing resources allocated to the current cache queue to perform serialization processing on the extracted at least one business-related data to obtain the corresponding serialization result.
[0124] Specifically, the target detection service on the server can determine whether each cache queue meets the batch data processing conditions. When it determines that the current cache queue meets the conditions, it performs batch serialization processing on the business-related data in the current cache queue. The batch data processing conditions can be freely set according to requirements. For example, batch serialization processing can be performed when the amount of business-related data cached in the current cache queue reaches a business data volume threshold. Alternatively, it can extract cached business-related data from the current cache queue at preset intervals and perform batch serialization processing on the extracted business-related data.
[0125] In one embodiment, reference Figure 5 When the target detection service receives batch business-related data, it can perform delayed statistical aggregation processing on the batch business-related data, cache business-related data of different indicator types into the corresponding cache queues, and perform batch serialization processing on the business-related data in the cache queues at preset intervals to obtain the serialization result of binary sequences. Figure 5 A schematic diagram of the batch serialization process in one embodiment is shown.
[0126] In this embodiment, since the cache queue stores business-related data of the same metric type, the business-related data of the same metric type can be serialized in batches, thereby improving the processing efficiency of serialization.
[0127] In one embodiment, the server is further configured to determine the metric type corresponding to each cache queue; determine the data characteristics of the business-related data cached in each cache queue based on the metric type; and determine the data processing resources to be allocated to each cache queue based on the data characteristics of the business-related data cached in each cache queue; the data processing resources include a data processing thread group.
[0128] Specifically, for each of the multiple cache queues, the target detection service on the server determines the indicator type of the business-related data cached in the current cache queue and uses this indicator type as the indicator type of the current cache queue. Further, based on the determined indicator type, the target detection service determines the data characteristics of the business-related data cached in the current cache queue. Here, data characteristics refer to information used to describe the characteristics of the data. For example, if the current business-related data is a visual inspection indicator type, it can be determined that the data volume is large, requiring significant computer resources to report to the cloud platform; conversely, if the current business-related data is a resource call result indicator, it can be determined that the data volume is small, requiring less computer resources to report to the cloud platform.
[0129] Furthermore, the target detection service dynamically allocates a corresponding amount of data processing resources to each cache queue based on the data characteristics of the business-related data cached in each cache queue. These data processing resources include data processing thread groups. For example, when the current cache queue contains business-related data of the visual inspection metric type, due to the large volume of this data, a data thread group with a larger number of threads can be allocated to the current cache queue; conversely, when the current cache queue contains business-related data of the resource call result metric type, a data thread group with a smaller number of threads can be allocated to the current cache queue.
[0130] In this embodiment, by allocating different amounts of data processing resources to different cache queues based on data characteristics, the batch serialization process of each cache queue can be balanced based on dynamically allocated data processing resources, thereby improving the overall performance of serialization processing.
[0131] In one embodiment, the server is further configured to: determine the reporting priority of the corresponding serialization result in the global sending queue according to the indicator type corresponding to each serialization result; and report the serialization result according to the reporting priority and based on the allocated data reporting resources.
[0132] Specifically, the target detection service can determine the metric type corresponding to each serialization result in the global sending queue. For each serialization result among multiple serialization results, since the current serialization result is obtained by the target detection service after serializing the current business-related data, the metric type of the current business-related data can be used as the metric type of the current serialization result.
[0133] The target detection service obtains the correspondence between reporting priority and indicator type, determines the reporting priority of each serialization result according to the indicator type of each serialization result, and reports the serialization results in the global sending queue according to the determined reporting priority.
[0134] In the above embodiments, by reporting the serialization results according to the reporting priority, serialization results with high priority can be reported first, while serialization results with low priority can be reported temporarily.
[0135] In one embodiment, the data reporting request is sent through the client, and the server is further configured to: determine the data reception result of the target probing service receiving batch business-related data, and when the data reception result indicates reception failure, determine a first failure type of reception failure; generate a first callback information according to the first failure type, and return the first callback information to the client; wherein the first callback information is used to trigger the client to resend the data reporting request based on the first failure type; determine the processing result of the target probing service performing batch serialization processing on business-related data in the cache queue, and when the processing result indicates processing failure, determine a second failure type of processing failure; generate a second callback information according to the second failure type, and return the second callback information to the client; wherein the second callback information is used to trigger the client to resend the data reporting request based on the second failure type.
[0136] Specifically, the central service on the server side can determine the data reception result of the target probing service receiving batch service-related data. For example, it can determine whether the target probing service successfully received the batch service-related data or whether it failed to receive the batch service-related data. When it is determined based on the data reception result that the target probing service failed to receive the batch service-related data, the central service determines the first failure type of the reception failure and generates a first callback information according to the first failure type, returning the first callback information to the client. Further, when the client receives the first callback information, it can determine whether to resend the data reporting request based on the first failure type in the first callback information. For example, when the client determines that the first failure type is unrecoverable, it can be assumed that even if the client resends the data reporting request, the target probing service will not be able to successfully receive the batch service-related data. In this case, the client suspends resending the data reporting request. When the client determines that the first failure type is recoverable, it can be assumed that the target probing service can successfully receive the batch service-related data through the data reporting request resent by the client. In this case, the client resends the data reporting request.
[0137] For example, the absence of a target detection service or network failure can be classified as an unrecoverable type. When the central service cannot filter out a target detection service or determines that there is a network failure, the central service can generate corresponding first callback information, allowing the client to suspend sending data reporting requests based on the first callback information. Bandwidth full or timeout handling can be classified as a recoverable type. When the central service determines that the target detection service's bandwidth is full, or that the target detection service has timed out due to failing to successfully receive batch service-related data within a preset time, the central service can generate corresponding first callback information, allowing the client to resend data reporting requests based on the first callback information.
[0138] Furthermore, when the target detection service successfully receives batch service-related data, it can perform batch serialization processing on the batch service-related data to obtain serialization results. The central service can detect the processing results of the target detection service in real time and generate second callback information based on the processing results. For example, it can generate corresponding second callback information when the processing result indicates successful processing. When the central service determines that the batch serialization processing of the target detection service has failed based on the processing results, the central service determines the second failure type of the processing failure and generates second callback information based on the second failure type. The second callback information is then returned to the client, so that the client can resend the data reporting request when the second failure type is determined to be recoverable based on the second callback information, and suspend sending the data reporting request when the second failure type is determined to be unrecoverable based on the second callback information. It is easy to understand that the first and second callback information can be generated by the central service or by the target detection service. This embodiment does not limit this.
[0139] In one embodiment, when the central service determines that the bandwidth of the target detection service is full, or the target detection service fails to successfully receive batch service-related data within a preset time, the central service can classify the target detection service as a faulty detection service. Thus, when the central service receives a data reporting request resent by the client, it can route the data reporting request to other detection services that are in normal status.
[0140] In one embodiment, for ease of description, the callback information generated when the target detection service receives batch service-related data is referred to as the first callback information, and the callback information generated when the target detection service performs batch serialization processing on the batch service-related data is referred to as the second callback information. (See reference) Figure 6In step S602, the client can asynchronously report batch service-related data to the target probing service via a data reporting request. In step S604, the client can generate a callback receiving thread to receive the first callback information. In step S606, the client can determine whether the target probing service has successfully received the batch service data based on the first callback information. In step S608, when the client determines that the target probing service has successfully received the batch service-related data based on the first callback information, the client continues to receive the second callback information through the callback receiving thread. In step S610, when the client determines that the target probing service has failed to successfully receive the batch service-related data based on the first callback information, the client determines the failure type of the failure based on the first callback information. In step S612, the client determines whether the failure type is recoverable, and if it is, resends the data reporting request; if it is, it exits the data reporting request transmission process. S614 The central service can probe the batch serialization process of business-related data generated by the target probe service, and generate a second callback message based on the serialization result. This second callback message is returned to the client via a callback receiving thread, allowing the client to determine whether the target probe service has completed the batch serialization of business-related data. S616 When it is determined that the target probe service has completed the batch serialization of business-related data, the client can determine if an error occurred during the batch serialization process. The client checks if the second callback message contains a failure type indicating a processing failure. If so, it can be assumed that an error occurred during the batch serialization of business-related data by the target probe service. The client then determines whether to resend the data reporting request based on the failure type. S618 The client checks whether it has received the second callback message within a preset time period and terminates the data reporting request if it has not received the second callback message. Figure 6 A flowchart of a client asynchronously reporting data reporting request in one embodiment is shown.
[0141] In the above embodiments, a callback mechanism is used to determine whether batch service-related data has been successfully received and processed. If batch service-related data is not successfully received or processed, the data reporting request can be resent. In this way, the success rate of receiving and processing batch service-related data can be improved based on the resent data reporting request.
[0142] In one embodiment, business-related data is obtained by each business service through data detection of the execution status of target tasks generated when managing the target site; the business service includes at least one of visual inspection service, business assistance service, and resource management service; the indicator types of business-related data include at least one of visual inspection indicator, task execution result indicator, resource call result indicator, and available resource indicator.
[0143] Specifically, when it is necessary to manage a target site, a corresponding target task can be generated. The target business can then execute the target task, and the computer resources consumed and their usage during execution can be monitored to obtain relevant business data. Here, the target site refers to the geographical area where customer flow statistics need to be performed. This can be a virtual geographical boundary enclosed by a virtual fence around a target location such as a shopping mall, cinema, or tourist attraction, or a physical geographical boundary enclosed by the facade of a target location such as a shopping mall, cinema, or office building. Correspondingly, the target task can be a statistical task for performing customer flow statistics on the target site.
[0144] To execute the target task, multiple business services can be deployed. By listening to these deployed services, relevant business data can be obtained, and the execution result and execution status of the target task can be determined based on this data. For example, a visual inspection service, a business assistance service, and a resource management service can be deployed on the business server. The visual inspection service provides CV (Computer Vision) computation logic, such as extracting animal features from video streams, clustering animal features, performing object detection based on clustered animal features, and determining animal movement trajectories based on detected animals. The business assistance service provides and stores intermediate and final results of CV computation. For example, it can store animal images, determine the number of animals entering the target area based on animal movement trajectories, and store the corresponding number of animals entering the target area. The resource management service monitors the computer resources consumed during CV computation and the status of each interface call. For example, it can determine GPU and CPU utilization, disk space availability, and the number of calls to each interface.
[0145] Listening to business services of different business types can generate business-related data of different indicator types. These business-related data indicators must include at least one of the following types: visual inspection indicators, task execution result indicators, resource call result indicators, and available resource indicators. Specifically, listening to the visual inspection service can generate business-related data of the visual inspection indicator type; for example, listening to the visual inspection service can yield animal detection box data, animal feature data, and feature cluster data. Listening to the business auxiliary service can yield business-related data of the task execution result indicator type; for example, listening to the business auxiliary service can yield traffic data. Listening to the resource management service can generate business-related data of the resource call result indicator type and business-related data of the available resource indicator type; for example, listening to the resource management service can yield interface call counts, database operation counts, and interface call failure rates (resource call result indicator type); listening to the resource management service can yield CPU utilization, GPU utilization, and disk space remaining (available resource indicator type).
[0146] In this embodiment, by deploying business services of different business types, business-related data of corresponding indicator types can be obtained based on the business services, and then the business-related data can be reported to the cloud server so that the cloud platform in the cloud server can perform statistics on the business-related data.
[0147] In one embodiment, reference Figure 7 This provides a method for reporting business-related data, applicable to... Figure 1 The computer cluster 106 in the middle includes the following steps:
[0148] S702, upon receiving a data reporting request, receives batch business-related data corresponding to the data reporting request through the target probing service that meets the service validity requirements in the service cluster; the batch business-related data is obtained based on data probing of the execution status of the target task;
[0149] S704, determine the indicator type corresponding to each business-related data in the batch business-related data;
[0150] S706 distributes the relevant data for each business to the cache queue that matches the corresponding indicator type.
[0151] S708, based on the data processing resources allocated to each cache queue, performs batch serialization processing on the business-related data in each cache queue to obtain the corresponding serialization results;
[0152] S710 caches each serialization result to the global send queue and reports the serialization results in the global send queue based on the allocated data reporting resources.
[0153] Specifically, when the central service in the computer cluster receives a data reporting request, it identifies a target probing service within the cluster that meets the service validity criteria and forwards the data reporting request to that service. The service then receives batch business-related data corresponding to the data reporting request through the target probing service. The target probing service determines the corresponding indicator type for each piece of business-related data in the batch and distributes each piece of data to the corresponding cache queue. Based on the data processing resources allocated to each cache queue, it performs batch serialization processing on the business-related data in each cache queue to obtain serialization results. Further, the target probing service caches each serialization result in a global sending queue and, based on the allocated data reporting resources, reports the serialization results in the global sending queue.
[0154] In the aforementioned business-related data reporting system, when the server receives a data reporting request, it identifies a target detection service in the service cluster that meets service validity requirements. Based on this identified target detection service, it can effectively receive batches of business-related data, thereby improving the efficiency of receiving batch business-related data. By determining the corresponding indicator type for each piece of business-related data in the batch, the business-related data can be cached in the corresponding cache queue based on the indicator type. This allows for batch serialization processing of business-related data of the same type based on allocated data reporting resources. This not only reduces the probability of frequent serialization processing of different types of business-related data but also improves the processing efficiency of serialization processing because it involves batch processing of similar data. Serialization of business-related data yields compact serialization results. By caching these compact serialization results in a global sending queue, they can be reported based on data reporting resources, thereby reducing the computer resources consumed during data reporting. Compared to the traditional method of directly reporting acquired business-related data to the cloud platform, this application deploys a probe service cluster, a cache queue, and a global sending queue. Based on these, batches of business-related data can be asynchronously sent to the cloud platform, thereby reducing the probability of quickly exhausting computer resources during peak periods and failing to fully utilize computer resources during idle periods, thus improving the reporting rate of business-related data.
[0155] In one embodiment, each serialization result is cached in a global sending queue, and the serialization results in the global sending queue are reported based on the allocated data reporting resources. This includes: determining the reporting priority of the corresponding serialization result in the global sending queue according to the indicator type corresponding to each serialization result; and reporting the serialization results according to the reporting priority and based on the allocated data reporting resources.
[0156] Specifically, the target detection service on the server can determine the metric type corresponding to each serialization result in the global sending queue. For each serialization result among multiple serialization results, since the current serialization result is obtained by the target detection service after serializing the current business-related data, the metric type of the current business-related data can be used as the metric type of the current serialization result.
[0157] The target detection service obtains the correspondence between reporting priorities and indicator types, and determines the reporting priority of each serialization result based on its corresponding indicator type. It then reports the serialization results in the global sending queue according to the determined reporting priority. For example, serialization results of available resource indicator types can be reported first to remind administrators of the current computer resource usage and to promptly expand capacity when computer resources are insufficient. It's easy to understand that when multiple detection services correspond to a single global sending queue, the computer node containing the global sending queue can report the serialization results according to the reporting priority.
[0158] In one embodiment, the serialization results corresponding to the available resource indicators can be reported first, followed by the serialization results corresponding to the task execution result indicators, then the serialization results corresponding to the resource call result indicators, and finally the serialization results corresponding to the visual inspection indicators.
[0159] In one embodiment, when a business service generates current business-related data, it can compare this data with corresponding standard data to determine whether it is alarm data. If the data is indeed alarm data, an alarm tag is added. The target detection service can then determine the corresponding indicator type as an alarm type based on this alarm tag. For example, if the business service determines that the computer disk is full based on the current business-related data, an alarm tag can be added. Similarly, if the business service determines that traffic data is below a traffic threshold (e.g., the number of goats entering the pen is less than a preset goat threshold), an alarm tag can be added. When the current business-related data is alarm data, the target detection service can determine that the indicator type of the current serialization result generated based on the data is an alarm type. Therefore, the target detection service prioritizes reporting the serialization result of the alarm type to the cloud platform.
[0160] In the above embodiments, by reporting the serialization results according to the reporting priority, serialization results with high priority can be reported first, while serialization results with low priority can be reported temporarily.
[0161] In one specific embodiment, reference Figure 8 This paper provides a method for reporting business-related data, including the following steps:
[0162] S802 establishes a heartbeat link with each probe service in the service cluster and sends heartbeat packets to the probe services through the heartbeat link.
[0163] S804: If no heartbeat packet is received from the probe service via the heartbeat link within the preset response period, the probe service is determined to be in a faulty state.
[0164] S806, when receiving a data reporting request from a client, determines the target detection service in the service cluster that meets the service validity requirements; the client is used to store business-related data in a data queue when it hears that a business service generates business-related data; the data reporting request is a request generated by the client based on a batch of business-related data in the data queue when it determines that the data queue meets the request generation conditions; the business-related data is obtained by each business service through data detection of the execution status of the target task generated when managing the target site.
[0165] S808, When a target detection service is determined, the target registration information of the target detection service is queried through the central service; wherein, the target registration information is the data sent by the target detection service to the central service for service registration when registering with the central service.
[0166] S810 forwards data reporting requests to the target detection service through the central service and based on the target registration information, so as to extract batch business-related data from the data reporting requests through the target detection service.
[0167] S812, when the target detection service receives batch business-related data, it stores the batch business-related data in the database through the target detection service; when the detection service fails and loses business-related data, it performs data recovery based on the business-related data stored in the database.
[0168] S814: For each piece of business-related data in the batch of business-related data, determine the target business service associated with the current business-related data.
[0169] S816: Based on the business type corresponding to the target business service, determine the indicator type corresponding to the current business-related data; distribute each business-related data to the cache queue that matches the corresponding indicator type.
[0170] S818: For each of the multiple cache queues, when the current cache queue meets the batch data processing conditions, at least one business-related data is extracted from the current cache queue.
[0171] S820 uses the data processing resources allocated to the current cache queue to serialize at least one extracted business-related data to obtain the corresponding serialization result.
[0172] S822: Determine the reporting priority of the corresponding serialization result in the global sending queue according to the indicator type corresponding to each serialization result; report the serialization result according to the reporting priority and based on the allocated data reporting resources.
[0173] In the aforementioned business-related data reporting method, upon receiving a data reporting request, a target probing service that meets the service validity criteria within the service cluster is identified. Based on this identified target probing service, batch business-related data can be effectively received, thereby improving the efficiency of receiving batch business-related data. By determining the corresponding indicator type for each piece of business-related data in the batch, the business-related data can be cached in the corresponding cache queue based on the indicator type. This allows for batch serialization processing of business-related data of the same type based on allocated data reporting resources. This not only reduces the probability of frequent serialization processing of different types of business-related data but also improves the processing efficiency of serialization processing due to batch processing of similar data. Serialization processing of business-related data yields compact serialization results. By caching these compact serialization results in a global sending queue, they can be reported based on data reporting resources, thereby reducing the computer resources consumed during data reporting. Compared to the traditional method of directly reporting acquired business-related data to the cloud platform, this application deploys a probe service cluster, a cache queue, and a global sending queue. Based on these, batches of business-related data can be asynchronously sent to the cloud platform, thereby reducing the probability of quickly exhausting computer resources during peak periods and failing to fully utilize computer resources during idle periods, thus improving the reporting rate of business-related data.
[0174] This application also provides an application scenario in which the above-described business-related data reporting method is applied. Specifically, the application of the business-related data reporting method in this scenario is as follows:
[0175] refer to Figure 9When it is necessary to determine the number of animals entering the target area, managers can pre-install entry and exit cameras at the entrances and exits. Entry cameras capture video streams of animals entering the target area, while exit cameras capture video streams of animals leaving the area. A visual inspection service is deployed on the business server to extract video streams from the entry, exit, and exit cameras, decode the video streams to obtain multiple image frames, and then filter out the entry and exit image frames containing animal images. The visual inspection service performs animal detection on the entry and exit image frames to obtain entry and exit trajectories. The business auxiliary service deployed on the business server can then store these trajectories and determine the flow data of animals entering and leaving the target area based on them. During the flow data determination process by the visual inspection service and the business auxiliary service, the business server can use a resource management service to probe its computer resources, obtaining CPU utilization, GPU utilization, and disk utilization.
[0176] Furthermore, the client can asynchronously send animal features and trajectories generated by the visual inspection service, traffic data generated by the business assistance service, and CPU utilization, GPU utilization, and disk utilization generated by the resource management service as business-related data to the central service in batches. This allows the central service to route the batch of business-related data to the corresponding target detection service. The target detection service determines the metric type of each business-related data in the batch through a distributor and caches the business-related data into the corresponding cache queue according to the metric type. This allows for batch serialization processing of the business-related data in the cache queue to obtain serialization results. The target detection service caches the serialization results into a global sending queue and, through multiple threads in a thread pool, reports the serialization results in the global sending queue to the cloud server. Figure 9 A schematic diagram of the overall architecture for reporting business-related data is shown in one embodiment.
[0177] This application also provides another application scenario in which the above-described business-related data reporting method is applied. Specifically, the application of the business-related data reporting method in this scenario is as follows:
[0178] When large, multi-story sheep pens need disinfection, the visual inspection service can acquire the entry and exit trajectories of the goats. Based on the entry trajectories, the business support service can determine the number of goats entering the pen that day, and based on the exit trajectories, determine the number leaving the pen. If the difference between the number of goats entering and leaving the pen is greater than or equal to a preset threshold, it can be assumed that not all goats have left the pen. In this case, the business support service generates corresponding alarm data and sends it to the target detection service. The target detection service then prioritizes reporting the alarm data to the cloud server. Management personnel can then use the cloud server to determine that not all goats have left the pen and proceed to the pen to ensure all goats leave. This allows for subsequent comprehensive disinfection of the pen, preventing the disinfectant from harming the goats.
[0179] The above application scenarios are merely illustrative. It is understood that the application of the business-related data reporting methods provided in the embodiments of this application is not limited to the above scenarios.
[0180] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0181] It should be understood that, although Figure 2 , 8 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 , 8 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0182] In one embodiment, such as Figure 10 As shown, a business-related data reporting device 1000 is provided. This device can be a software module, a hardware module, or a combination of both as part of a computer device. Specifically, the device includes: a batch data receiving module 1002, a serialization processing module 1004, and a data reporting module 1006, wherein:
[0183] The batch data receiving module 1002 is used to receive batch business-related data corresponding to the data reporting request through the target detection service that meets the service validity in the service cluster when a data reporting request is received; the batch business-related data is obtained based on data detection of the execution status of the target task.
[0184] The serialization processing module 1004 is used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data; distribute each piece of business-related data to a cache queue that matches the corresponding indicator type; and perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue to obtain the corresponding serialization result.
[0185] The data reporting module 1006 is used to cache each serialization result to the global sending queue and report the serialization results in the global sending queue based on the allocated data reporting resources.
[0186] In one embodiment, reference Figure 11 The batch data receiving module 1002 also includes a service filtering module 1021, which is used to filter out the detection services that are in a fault state from the service cluster when a data reporting request is received; select the detection services with a load less than a preset load threshold from the filtered detection services as target detection services; and forward the data reporting request to the target detection service so as to extract the batch business-related data in the data reporting request through the target detection service.
[0187] In one embodiment, the service filtering module 1021 is further configured to establish a heartbeat link with each probe service in the service cluster and send a heartbeat packet to the probe service through the heartbeat link; when no heartbeat packet is received from the probe service through the heartbeat link within a preset response period, the probe service is determined to be a probe service in a fault state.
[0188] In one embodiment, the batch data receiving module 1002 is further configured to query the target registration information of the target detection service through the central service when the target detection service is determined; wherein, the target registration information is the data sent by the target detection service to the central service for service registration when it registers with the central service; and forward the data reporting request to the target detection service through the central service and based on the target registration information, so as to extract the batch business-related data in the data reporting request through the target detection service.
[0189] In one embodiment, the batch data receiving module 1002 is further configured to determine the target probe service in the service cluster that meets the service validity requirements when receiving a data reporting request sent by the client; the data reporting request is a request generated by the client based on the batch of business-related data in the data queue when the client determines that the data queue used to store business-related data meets the request generation conditions; wherein, the business-related data stored in the data queue is stored by the client when it hears the business service generating business-related data.
[0190] In one embodiment, the serialization processing module 1004 further includes an indicator type determination module 1041, which is used to determine the target business service associated with the current business-related data for each business-related data in the batch business-related data; and to determine the indicator type corresponding to the current business-related data based on the business type corresponding to the target business service.
[0191] In one embodiment, the serialization processing module 1004 is further configured to, for each of the multiple cache queues, extract at least one business-related data from the current cache queue when the current cache queue meets the batch data processing conditions; and perform serialization processing on the extracted at least one business-related data using the data processing resources allocated to the current cache queue to obtain the corresponding serialization result.
[0192] In one embodiment, the serialization processing module 1004 is further configured to determine the metric type corresponding to each cache queue; determine the data characteristics of the business-related data cached in each cache queue based on the metric type; and determine the data processing resources to be allocated to each cache queue based on the data characteristics of the business-related data cached in each cache queue; the data processing resources include a data processing thread group.
[0193] In one embodiment, the data reporting module 1006 is further configured to determine the reporting priority of the corresponding serialization result in the global sending queue according to the indicator type corresponding to each serialization result; and report the serialization result according to the reporting priority and based on the allocated data reporting resources.
[0194] In one embodiment, the business-related data reporting device 1000 is further configured to store the batch of business-related data in a database through the target detection service when the target detection service receives the batch of business-related data; and to perform data recovery based on the business-related data stored in the database when the detection service fails and loses the business-related data.
[0195] In one embodiment, the business-related data reporting device 1000 is further configured to determine the data reception result of the target probing service receiving batch business-related data, and when the data reception result indicates reception failure, determine a first failure type of reception failure; generate first callback information based on the first failure type, and return the first callback information to the client; wherein, the first callback information is used to trigger the client to resend the data reporting request based on the first failure type; determine the processing result of the target probing service performing batch serialization processing on the business-related data in the cache queue, and when the processing result indicates processing failure, determine a second failure type of processing failure; generate second callback information based on the second failure type, and return the second callback information to the client; wherein, the second callback information is used to trigger the client to resend the data reporting request based on the second failure type.
[0196] In one embodiment, the business-related data reporting device 1000 is also used to acquire business-related data, which is obtained by each business service through data detection of the execution status of the target task generated when managing the target site; the business service includes at least one of visual inspection service, business assistance service, and resource management service; the indicator type of the business-related data includes at least one of visual inspection indicator, task execution result indicator, resource call result indicator, and available resource indicator.
[0197] Specific limitations regarding the business-related data reporting device can be found in the limitations on the business-related data reporting method described above, and will not be repeated here. Each module in the aforementioned business-related data reporting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0198] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 12 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores business-related data. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a method for reporting business-related data.
[0199] Those skilled in the art will understand that Figure 12 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0200] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0201] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0202] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0203] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0204] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0205] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A business-related data reporting system, characterized in that, Including client and server sides, among which: The client is used to probe the execution status of the target task, obtain business-related data, and store the business-related data in a data queue. The client is also configured to generate a data reporting request based on a batch of business-related data in the data queue when it is determined that the data queue meets the request generation conditions, and send the data reporting request to the server. The server is configured to receive batch business-related data corresponding to the data reporting request through a target detection service in the service cluster that meets the service validity requirements when a data reporting request is received. This step of receiving batch business-related data corresponding to the data reporting request through a target detection service in the service cluster that meets the service validity requirements when a data reporting request is received includes: when a data reporting request is received, filtering out detection services in a faulty state from the service cluster through the server's central service, selecting detection services with a load less than a preset load threshold from the filtered detection services as target detection services, and forwarding the data reporting request to the target detection service to extract batch business-related data from the data reporting request through the target detection service. The server is also used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data, and to distribute each piece of business-related data to a cache queue that matches the corresponding indicator type. The server is also used to perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue, and obtain the corresponding serialization results. The server is also configured to cache each of the serialization results to a global sending queue, and report the serialization results in the global sending queue based on the allocated data reporting resources.
2. The system according to claim 1, characterized in that, The central service of the server is also used for: Establish a heartbeat link with each detection service in the service cluster, and send heartbeat packets to the detection service through the heartbeat link; If no heartbeat packet is received from the detection service through the heartbeat link within a preset response period, the detection service is determined to be in a faulty state.
3. The system according to claim 1, characterized in that, The central service of the server is also used for: When a target detection service is identified, the target registration information of the target detection service is queried; wherein, the target registration information is the data sent by the target detection service to the central service for service registration when the target detection service registers with the central service. Based on the target registration information, the data reporting request is forwarded to the target detection service, so as to extract batch business-related data from the data reporting request through the target detection service.
4. The system according to claim 1, characterized in that, The server is also used for: For each piece of business-related data in the batch of business-related data, a target business service associated with the current business-related data is determined; Based on the business type corresponding to the target business service, determine the indicator type corresponding to the current business-related data.
5. The system according to claim 1, characterized in that, The server is also used for: For each of the multiple cache queues, when the current cache queue meets the batch data processing conditions, at least one business-related data is extracted from the current cache queue; By using the data processing resources allocated to the current cache queue, at least one business-related data is extracted and serialized to obtain the corresponding serialization result.
6. The system according to claim 5, characterized in that, The server is also used for: Determine the corresponding metric type for each cache queue; Based on the aforementioned indicator type, determine the data characteristics of the business-related data cached in each cache queue; Based on the data characteristics of the business-related data cached in each cache queue, the data processing resources to be allocated to each cache queue are determined; the data processing resources include data processing thread groups.
7. The system according to claim 1, characterized in that, The server is also used for: Based on the index type corresponding to each of the serialization results, the reporting priority of the corresponding serialization results in the global sending queue is determined; The serialization result is reported according to the reported priority and based on the allocated data reporting resources.
8. The system according to claim 1, characterized in that, The server is also used for: When the target detection service receives batch service-related data, it stores the batch service-related data in the database through the target detection service. When the detection service malfunctions and loses the business-related data, data recovery is performed based on the business-related data stored in the database.
9. The system according to claim 1, characterized in that, The server is also used for: The target detection service receives the data reception result of the batch service-related data, and when the data reception result indicates reception failure, the first failure type of reception failure is determined. A first callback message is generated based on the first failure type, and the first callback message is returned to the client; wherein, the first callback message is used to trigger the client to resend the data reporting request based on the first failure type; Determine the processing result of the target detection service in batch serializing the business-related data in the cache queue, and when the processing result indicates a processing failure, determine a second failure type of the processing failure; A second callback message is generated based on the second failure type, and the second callback message is returned to the client; wherein, the second callback message is used to trigger the client to resend the data reporting request based on the second failure type.
10. The system according to any one of claims 1 to 9, characterized in that, The business-related data is obtained by each business service through data detection of the execution status of target tasks generated when managing the target site; the business service includes at least one of visual inspection service, business assistance service, and resource management service; the indicator types of the business-related data include at least one of visual inspection indicator, task execution result indicator, resource call result indicator, and available resource indicator.
11. A method for reporting business-related data, characterized in that, The method includes: Upon receiving a data reporting request, the service cluster receives batch business-related data corresponding to the data reporting request through a target probing service that meets service validity requirements. The batch business-related data is obtained based on data probing of the execution status of the target task. Determine the corresponding indicator type for each piece of business-related data in the batch of business-related data; Distribute the business-related data to the cache queues that match the corresponding metric types; Based on the data processing resources allocated to each cache queue, the business-related data in each cache queue is processed in batch serialization to obtain the corresponding serialization results. Each of the serialization results is cached in a global sending queue, and the serialization results in the global sending queue are reported based on the allocated data reporting resources; The service cluster includes at least one probe service. When a data reporting request is received, the batch of business-related data corresponding to the data reporting request is received through a target probe service in the service cluster that meets the service validity requirements. This includes: When a data reporting request is received, the central service in the server filters out the detection services that are in a faulty state from the service cluster. The central service selects detection services with a load less than a preset load threshold from the filtered detection services and uses them as target detection services. The central service forwards the data reporting request to the target detection service, so that the target detection service can extract batch business-related data from the data reporting request.
12. The method according to claim 11, characterized in that, The step of caching each of the serialization results to a global sending queue and reporting the serialization results in the global sending queue based on the allocated data reporting resources includes: Based on the index type corresponding to each of the serialization results, the reporting priority of the corresponding serialization results in the global sending queue is determined; The serialization result is reported according to the reported priority and based on the allocated data reporting resources.
13. A business-related data reporting device, characterized in that, The device includes: The batch data receiving module is used to, upon receiving a data reporting request, filter out faulty detection services from the service cluster through the central service on the server side, select detection services with a load below a preset load threshold from the filtered detection services, and forward the data reporting request to the target detection service so as to extract batch business-related data from the data reporting request; the batch business-related data is obtained based on data detection of the execution status of the target task; The serialization processing module is used to determine the corresponding indicator type for each piece of business-related data in the batch of business-related data; distribute each piece of business-related data to a cache queue that matches the corresponding indicator type; and perform batch serialization processing on the business-related data in each cache queue based on the data processing resources allocated to each cache queue to obtain the corresponding serialization result. The data reporting module is used to cache each of the serialization results to a global sending queue, and to report the serialization results in the global sending queue based on the allocated data reporting resources.
14. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method of claim 11 or 12.
15. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 11 or 12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 11 or 12.
Citation Information
Patent Citations
Customized real-time data efficient pushing method and system
CN111311142A
Service message reporting method and device, equipment and medium
CN111510395A