A map service traffic recording system and method for a cloud native platform

By combining traffic scheduling and recording units in a cloud-native platform, the problem of existing tools being unable to adapt to multiple protocols was solved, enabling multi-protocol traffic recording for cloud-native platform map services, thus ensuring system stability and testing flexibility.

CN113971200BActive Publication Date: 2025-09-12BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111264775.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-28
Publication Date
2025-09-12
Estimated Expiration
2041-10-28

AI Technical Summary

Technical Problem

Existing traffic recording tools cannot adapt to the various protocols of map services under the cloud-native Kubernetes platform, and the Kubernetes-built-in Service-Mesh can only achieve real-time copying and cannot perform asynchronous recording and repeated playback, which makes it difficult to meet the performance testing requirements.

Method used

This paper provides a map service traffic recording system for a cloud-native platform. The system acquires traffic data through a traffic scheduling unit and distributes it to different recording units based on the protocol type. The data is then cached in the corresponding local storage. The system supports brpc and mcpack protocols and uses Service-Mesh routing capabilities to perform traffic diversion and quota control, ensuring system stability.

Benefits of technology

It enables multi-protocol traffic data recording for map services on cloud-native platforms, ensuring stable operation of online services and flexibility in testing, improving protocol adaptability and system stability, and meeting the needs of asynchronous recording and repeated playback.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113971200B_ABST
    Figure CN113971200B_ABST
Patent Text Reader

Abstract

The present disclosure provides a map service traffic recording system and method for a cloud native platform, which relates to the field of computer technology, and in particular to the field of big data technology. The device includes: a traffic scheduling unit, which is used to obtain traffic data of a map service copied and diverted from a cloud native platform, and divert the traffic data to a first recording unit and a second recording unit based on the protocol type; the first recording unit is used to cache the diverted traffic data of the first protocol to a first local storage; the second recording unit is used to cache the diverted traffic data of the second protocol to a second local storage. It can be seen that copying and diverting from the cloud native platform does not affect the normal operation of the cloud native platform. In addition, the recording of traffic data of different protocols for map services under the cloud native platform is realized, which increases the protocol adaptability and improves the general capabilities. That is, the traffic recording system provided by the embodiment of the present disclosure can be applied to various map services in the cloud native platform.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to the field of big data technology. Background Art

[0002] Cloud-native deployment is the future development trend. Major companies have gradually migrated their online service deployments from ordinary containers to the cloud-native K8S (Kubernetes) environment, which has brought new challenges to testers' daily testing. Summary of the Invention

[0003] The present disclosure provides a system and method for recording map service traffic on a cloud native platform.

[0004] According to one aspect of the present disclosure, a map service traffic recording system for a cloud native platform is provided, comprising:

[0005] A traffic scheduling unit, configured to obtain traffic data of a map service copied and directed from a cloud native platform, and to distribute the traffic data to at least two recording units based on a protocol type, the at least two recording units comprising: a first recording unit and a second recording unit;

[0006] The first recording unit is configured to cache the traffic data of the first protocol obtained by diversion into a first local storage;

[0007] The second recording unit is used to cache the traffic data of the second protocol obtained by diversion into the second local storage.

[0008] According to another aspect of the present disclosure, a method for recording map service traffic on a cloud native platform is provided, comprising:

[0009] Obtaining traffic data of a map service copied and directed from a cloud native platform; wherein the cloud native platform is a K8S platform, and the traffic data of the map service is copied and directed by a Service-Mesh device in the K8S platform;

[0010] Divert traffic data based on protocol type, cache the diverted traffic data of the first protocol to a first local storage, and cache the diverted traffic data of the second protocol to a second local storage; the first protocol is brpc, and the second protocol is mcpack.

[0011] According to another aspect of the present disclosure, there is provided a server, comprising:

[0012] at least one processor; and

[0013] a memory communicatively connected to the at least one processor; wherein,

[0014] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the map service traffic recording method of the cloud native platform.

[0015] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute a map service traffic recording method for a cloud-native platform.

[0016] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements a method for recording map service traffic on a cloud native platform when executed by a processor.

[0017] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are provided to facilitate a better understanding of the present invention and do not constitute a limitation of the present disclosure.

[0019] Figure 1 A schematic diagram of a structure of a map service traffic recording system for a cloud native platform provided in an embodiment of the present disclosure;

[0020] Figure 2 Another structural diagram of the map service traffic recording system of the cloud native platform provided in an embodiment of the present disclosure;

[0021] Figure 3 A flow chart of a method for recording map service traffic on a cloud-native platform provided in an embodiment of the present disclosure;

[0022] Figure 4 Another flowchart of a method for recording map service traffic on a cloud-native platform provided in an embodiment of the present disclosure;

[0023] Figure 5 This is a block diagram of a server used to implement the map service traffic recording method of the cloud native platform of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] The following description of exemplary embodiments of the present disclosure is made in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding. These details should be considered as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0025] Cloud-native deployment is the trend of future development. The online service deployment of major companies has gradually migrated from ordinary containers to the cloud-native K8S environment.

[0026] The migration of online service deployment from ordinary containers to the cloud-native Kubernetes environment has brought new challenges to testers' daily testing.

[0027] Specifically, in legacy containerized environments, traffic recording was primarily performed through pod module registration and the brpc (Baidu Remote Procedure Call) framework. However, this method is not compatible with all service protocols and is only applicable to services using the brpc protocol. However, on cloud-native Kubernetes platforms, map services include not only brpc protocol traffic data, but also data from other protocols, such as mcpack. Therefore, existing traffic recording methods for legacy containerized environments are not suitable for cloud-native platforms.

[0028] The Service-Mesh that comes with K8S can only achieve real-time replication of service traffic, but cannot achieve the effect of asynchronous recording and repeated playback, which is of little significance for performance testing.

[0029] It can be seen that for cloud native, a new service deployment model, there is currently no effective traffic recording method and system for map services.

[0030] In order to solve the above technical problems, the present disclosure provides a map service traffic recording system and method for a cloud native platform.

[0031] In one embodiment of the present disclosure, a map service traffic recording system for a cloud native platform is provided, including:

[0032] A traffic scheduling unit, configured to obtain traffic data of a map service copied and directed from a cloud native platform, and to distribute the traffic data to at least two recording units based on a protocol type, the at least two recording units comprising: a first recording unit and a second recording unit;

[0033] The first recording unit is configured to cache the traffic data of the first protocol obtained by diversion into a first local storage;

[0034] The second recording unit is used to cache the traffic data of the second protocol obtained by diversion into the second local storage.

[0035] In the embodiment of the present disclosure, for the map service in the cloud native platform, it is possible to obtain traffic data copied and diverted from the cloud native platform, and divert it based on the protocol type. The traffic data of different protocols obtained by diversion are cached in the corresponding local memory respectively.

[0036] As can be seen, copying and diverting map service traffic data from the cloud-native platform does not affect the normal operation of the cloud-native platform, ensuring the online quality of the cloud-native service. Furthermore, the map service traffic data can be diverted and locally cached based on protocol type, enabling the recording of traffic data for different protocols of map services on the cloud-native platform. This increases protocol adaptability and improves general capabilities. Specifically, the traffic recording system provided by the disclosed embodiments is applicable to various map services on the cloud-native platform.

[0037] The following is a detailed introduction to the map service traffic recording system of the cloud native platform provided by the embodiments of the present disclosure.

[0038] See also Figure 1 , Figure 1 A structural diagram of a map service traffic recording system for a cloud native platform provided in an embodiment of the present disclosure. Figure 1 As shown, it includes a traffic scheduling unit and at least two recording units, and the at least two recording units include a first recording unit and a second recording unit.

[0039] The traffic scheduling unit is used to obtain traffic data of the map service copied and diverted from the cloud native platform, and to divert the traffic data to at least two recording units based on the protocol type.

[0040] Traffic data can be service request data, for example, data on interactions between users and map software, including service requests made by users to the map software and service response data fed back to users by the map software. This data can be used to test map services.

[0041] In the embodiment of the present disclosure, the cloud native platform may be a K8S platform, and the traffic data of the map service may be copied and directed by the Service-Mesh device in the K8S platform.

[0042] Service-Mesh is a traffic routing device that comes with the K8S environment deployment. It is a lightweight network proxy program that integrates with applications in a non-invasive way. It can take over the network traffic at the service entrance and exit and serve as a communication channel for the network topology between microservices.

[0043] In this disclosed embodiment, the routing capabilities of Service-Mesh can be leveraged to replicate traffic from a cloud-native online map service and direct it to an offline traffic dispatcher. Traffic replication can be based on a preset percentage, for example, replicating 10%-20% of the traffic data from the online map service.

[0044] Traffic routing based on Service-Mesh is not restricted by protocol and adapts to all service protocols, which is the basis for ensuring universality. Furthermore, Service-Mesh is a built-in traffic routing tool for Kubernetes, fully guaranteeing reliability and stability.

[0045] In the disclosed embodiment, the traffic scheduling unit is an offline cluster that can carry the traffic directed by the online K8S service through the Service-Mesh.

[0046] Specifically, the traffic scheduling unit obtains traffic data of the map service copied and diverted from the cloud native platform, and diverts the traffic data to at least two recording units based on the protocol type. The at least two recording units include: a first recording unit and a second recording unit.

[0047] The map service protocols in the cloud-native platform include brpc and mcpack. The traffic scheduling unit determines the protocol type of traffic data and implements traffic diversion based on the protocol type, sending brpc traffic data to the first recording unit and mcpack traffic data to the second recording unit.

[0048] The first recording unit is used to cache the traffic data of the first protocol obtained by diversion to the first local storage; the second recording unit is used to cache the traffic data of the second protocol obtained by diversion to the second local storage.

[0049] In this disclosed embodiment, the first recording unit is dedicated to processing traffic data from the brpc protocol map service. It features quantitative segmentation, disk quotas, and real-time replacement of traffic fields. It can cache brpc protocol traffic to local files of a specified size for temporary storage as static files. The size of each file is configurable to meet the needs of different testing scenarios. The cached data is in binary format and can be parsed using appropriate tools.

[0050] The second recording unit is specifically designed to process traffic data from the MCpack protocol map service. It also features quantitative segmentation, disk quotas, and real-time replacement of traffic fields. It can cache MCpack protocol traffic to local files of a specified size for temporary storage as static files. The size of each file is configurable to meet the needs of different testing scenarios. The cached data is in plain text JSON format for easy subsequent use.

[0051] In the embodiment of the present disclosure, for the map service in the cloud native platform, it is possible to obtain traffic data copied and diverted from the cloud native platform, and divert it based on the protocol type. The traffic data of different protocols obtained by diversion are cached in the corresponding local memory respectively.

[0052] As can be seen, copying and diverting map service traffic data from the cloud-native platform does not affect the normal operation of the cloud-native platform, ensuring the online quality of the cloud-native service. Furthermore, the map service traffic data can be diverted and locally cached based on protocol type, enabling the recording of traffic data for different protocols of map services on the cloud-native platform. This increases protocol adaptability and improves general capabilities. Specifically, the traffic recording system provided by the disclosed embodiments is applicable to various map services on the cloud-native platform.

[0053] In one embodiment of the present disclosure, see Figure 2 , Figure 2 Another structural diagram of the map service traffic recording system of the cloud native platform provided in the embodiment of the present disclosure is as follows Figure 2 As shown, in Figure 1 The following units were added:

[0054] A cloud storage transmission unit, configured to periodically upload the traffic data cached in the first local storage and the second local storage to the cloud storage;

[0055] The offline data pulling unit is used to pull traffic data from cloud storage and perform preset processing to obtain test data for the map service.

[0056] Specifically, traffic data temporarily stored in local files can be periodically uploaded to cloud storage, such as AFS (Andrew File System), to reduce local disk storage pressure. The upload cycle can be hourly, with each upload saved to the same online directory for easy retrieval by offline services.

[0057] In the disclosed embodiment, after uploading a large amount of map service traffic data to cloud storage, the offline data extraction module can extract the traffic data from the cloud storage. After performing pre-set processing such as sampling and filtering, test data for the map service can be obtained. Furthermore, during the offline data extraction process, the time period for extracting traffic data and the thinning ratio of traffic data can be pre-defined to fully meet the requirements of different testing tasks.

[0058] In one embodiment of the present disclosure, the traffic scheduling unit also has a traffic limit function, which can flexibly limit the diverted traffic to prevent excessive traffic data during peak periods from causing system instability.

[0059] Specifically, after obtaining the traffic data of the map service copied and diverted from the cloud native platform, you can first determine whether the traffic data of the obtained map service exceeds the preset quota. If so, discard part of the traffic data, and then divert the traffic based on the protocol type to achieve the traffic limit.

[0060] The map service traffic recording system of the cloud native platform provided by the embodiment of the present disclosure can achieve at least the following three beneficial effects.

[0061] 1. Ensure stable replication of traffic data. Since the replicated traffic data is the data generated during the operation of the online services of the cloud native platform, an important prerequisite for diverting service traffic offline is to ensure the stable operation of the cloud native platform services. In the disclosed embodiment, the traffic routing function of the Service-Mesh service that comes with K8S is used to copy the traffic content such as requests and responses during the operation of the map service and divert it to the offline traffic scheduling unit. It can ensure that there is no interference with online services, and the integrity of traffic data such as requests and responses can be retained to the maximum extent. At the same time, the recording unit can cache traffic data to local files, thereby solving the problem that the cloud native Service-Mesh can only divert traffic in real time but cannot store traffic locally, ensuring that testers can replay traffic at any time when testing the service without time restrictions.

[0062] 2. Ensure the universality of the protocol. The traffic data of the map service in the cloud-native environment is divided into two types: the mcpack protocol and the brpc protocol. Various existing traffic recording tools can only support the mcpack protocol or the brpc protocol, and cannot achieve universality of all protocols. The traffic recording system provided by the embodiment of the present disclosure integrates the recording tools of the mcpack protocol and the brpc protocol, and performs scheduling through a self-developed proxy service cluster, namely the traffic scheduling unit, to realize the diversion and caching of traffic data, solving the problem that existing traffic recording tools are difficult to adapt to multiple protocols.

[0063] 3. Ensure system stability. The traffic recording system provided by the embodiment of the present disclosure is directly connected to the real-time traffic of cloud-native online services. The real-time traffic of some online services can reach thousands of QPS (Query Per Second), so ensuring that the capacity of the offline cluster is sufficient and not overwhelmed by the cloud-native online traffic is also a key point in traffic recording. In the embodiment of the present disclosure, multiple flow limiting methods are adopted to control the concurrency of traffic. Specifically including: 1) Utilizing the traffic thinning capability of Service-Mesh, the first thinning is performed when the service traffic is diverted from the online to the traffic scheduling unit. 2) The traffic scheduling unit has a traffic quota function, that is, setting a maximum diversion upper limit to ensure the stability of the downstream cluster when the online traffic suddenly increases or decreases. 3) The first recording unit and the second recording unit both have a disk quota function when caching traffic data as static files, that is, after detecting that the size of the static file exceeds the threshold set in the configuration file, the old data is automatically cleaned up to ensure the stability of the local disk. Through the above three flow controls, the stability and reliability of traffic recording can be fully guaranteed.

[0064] See also Figure 3 , Figure 3 This is a flow chart of a method for recording map service traffic on a cloud native platform provided by an embodiment of the present disclosure. This method can be applied to offline clusters, such as Figure 3 As shown, the method may include the following steps:

[0065] S301: Obtain traffic data of the map service copied and directed from the cloud native platform; wherein the cloud native platform is the K8S platform, and the traffic data of the map service is copied and directed by the Service-Mesh device in the K8S platform.

[0066] S302: Traffic data is split based on protocol type, and the split traffic data of the first protocol is cached in a first local storage, and the split traffic data of the second protocol is cached in a second local storage; the first protocol is brpc protocol, and the second protocol is mcpack protocol.

[0067] In this embodiment of the application, the routing capabilities of Service-Mesh can be used to replicate the traffic of the cloud-native online map service and direct it to the offline cluster. The offline cluster divides the traffic data based on the protocol type.

[0068] Specifically, the protocol types of map services in the cloud native platform include brpc and mcpack. The offline cluster determines the protocol type of traffic data and implements traffic diversion based on the protocol type. The diverted traffic data of the first protocol is cached in the first local storage, and the diverted traffic data of the second protocol is cached in the second local storage.

[0069] In the embodiment of the present disclosure, for the map service in the cloud native platform, it is possible to obtain traffic data copied and diverted from the cloud native platform, and divert it based on the protocol type. The traffic data of different protocols obtained by diversion are cached in the corresponding local memory respectively.

[0070] As can be seen, copying and diverting map service traffic data from the cloud-native platform does not affect the normal operation of the cloud-native platform, ensuring the online quality of the cloud-native service. Furthermore, the map service traffic data can be diverted and locally cached based on protocol type, enabling the recording of traffic data for different protocols of map services on the cloud-native platform. This increases protocol adaptability and improves general capabilities. Specifically, the traffic recording system provided by the disclosed embodiments is applicable to various map services on the cloud-native platform.

[0071] See also Figure 4 , Figure 4 This is another flow chart of the method for recording map service traffic on a cloud native platform provided by the embodiment of the present disclosure, such as Figure 4 As shown, the method may include the following steps:

[0072] S401: Obtain traffic data of the map service copied and directed from the cloud native platform; wherein the cloud native platform is the K8S platform, and the traffic data of the map service is copied and directed by the Service-Mesh device in the K8S platform.

[0073] S402: Traffic data is split based on protocol type, and the split traffic data of the first protocol is cached in a first local storage, and the split traffic data of the second protocol is cached in a second local storage; the first protocol is brpc protocol, and the second protocol is mcpack protocol.

[0074] Among them, S401-S402 are the same as S301-S302 and will not be repeated here.

[0075] S403: Periodically upload the traffic data cached in the first local storage and the second local storage to the cloud storage, so that the cloud storage sends the traffic data in the cloud storage to the test terminal after receiving the pull request sent by the test terminal.

[0076] In this disclosed embodiment, traffic data temporarily stored in local files can be periodically uploaded to cloud storage, thereby reducing local disk storage pressure. The upload cycle can be in hourly units, that is, once an hour, and each uploaded traffic can be saved to the same online directory for easy retrieval by offline services.

[0077] When the test terminal needs to obtain test data, it can send a pull request to the cloud storage. After receiving the pull request, the cloud storage sends the requested traffic data to the test terminal.

[0078] Thus, the test terminal can perform preset processing such as sampling and filtering on the traffic data to obtain test data for map services.

[0079] In one embodiment of the present disclosure, the method may further include:

[0080] Determine whether the traffic data of the obtained map service exceeds the preset quota; if so, discard part of the traffic data.

[0081] It can be seen that the diverted traffic can be flexibly limited to prevent excessive traffic data during peak periods from causing system instability.

[0082] The method for recording map service traffic on a cloud-native platform provided by the embodiments of the present disclosure can achieve at least the following three beneficial effects.

[0083] 1. Ensure stable replication of traffic data. Since the replicated traffic data is the data generated during the operation of the online services of the cloud native platform, an important prerequisite for diverting service traffic offline is to ensure the stable operation of the cloud native platform services. In the disclosed embodiment, the traffic routing function of the Service-Mesh service that comes with K8S is used to copy the traffic content such as requests and responses during the operation of the map service and divert it to the offline cluster. It can ensure that there is no interference with online services, and the integrity of traffic data such as requests and responses can be retained to the maximum extent. At the same time, the traffic data diverted to the offline cluster can be cached to a local file, thereby solving the problem that the cloud native Service-Mesh can only divert traffic in real time but cannot store traffic locally, and ensure that testers can replay traffic at any time when testing the service without time restrictions.

[0084] 2. Ensure protocol universality. The traffic data of map services in cloud-native environments are divided into two types: the mcpack protocol and the brpc protocol. Various existing traffic recording tools can only support the mcpack protocol or the brpc protocol, and cannot achieve universality of all protocols. In the traffic recording method provided in the embodiment of the present disclosure, the recording tools of the mcpack protocol and the brpc protocol are integrated together, and the diversion and caching of traffic data are realized through the self-developed offline cluster, which solves the problem that existing traffic recording tools are difficult to adapt to multiple protocols.

[0085] 3. Ensure system stability. The traffic recording method provided in the embodiment of the present disclosure is aimed at the real-time traffic of cloud-native online services. The real-time traffic of some online services can reach thousands of QPS. Therefore, ensuring that the capacity of the offline cluster is sufficient and not overwhelmed by the cloud-native online traffic is also a problem that needs to be solved in traffic recording. In the embodiment of the present disclosure, multiple flow limiting methods are adopted to control the concurrency of traffic. Specifically including: 1) Utilizing the traffic thinning capability of Service-Mesh, the first thinning is performed when the service traffic is diverted from the online to the traffic scheduling unit. 2) It has a traffic quota function, that is, setting a maximum diversion upper limit to ensure the stability of the downstream cluster when the online traffic suddenly increases or decreases. 3) When caching traffic data as a static file, it has a disk quota function, that is, after detecting that the size of the static file exceeds the threshold set in the configuration file, it automatically cleans up the old data to ensure the stability of the local disk. Through the above three flow controls, the stability and reliability of traffic recording can be fully guaranteed.

[0086] According to an embodiment of the present disclosure, the present disclosure also provides a server, a readable storage medium, and a computer program product.

[0087] The present disclosure provides a server, comprising:

[0088] at least one processor; and

[0089] a memory communicatively connected to the at least one processor; wherein,

[0090] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the map service traffic recording method of the cloud native platform.

[0091] The present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute a method for recording map service traffic on a cloud native platform.

[0092] The present disclosure provides a computer program product, including a computer program, which implements a method for recording map service traffic on a cloud native platform when executed by a processor.

[0093] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are provided as examples only and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0094] As shown in the figure, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0095] Various components in device 500 are connected to I / O interface 505, including: an input unit 506, such as a keyboard, mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a magnetic disk, optical disk, etc.; and a communication unit 509, such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows device 500 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0096] The computing unit 501 can be a variety of general-purpose and / or specialized processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above, such as the map service traffic recording method of the cloud native platform. For example, in some embodiments, the map service traffic recording method of the cloud native platform can be implemented as a computer software program that is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the map service traffic recording method of the cloud native platform described above can be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to execute the map service traffic recording method of the cloud native platform in any other appropriate manner (for example, by means of firmware).

[0097] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), system-on-chip systems (SOCs), programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0098] The program code for implementing the method of the present disclosure can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0099] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0101] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0102] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.

[0103] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved. This is not a limitation herein.

[0104] The above specific embodiments do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure shall be included within the scope of protection of this disclosure.

Claims

1. A cloud-native platform map service traffic recording system, comprising: a traffic scheduling unit, configured to obtain traffic data of a map service copied and directed from a cloud-native platform, and to distribute the traffic data to at least two recording units based on a protocol type, the at least two recording units comprising: a first recording unit and a second recording unit; the cloud-native platform being a Kubernetes platform, and the traffic data of the map service being copied and directed by a Service-Mesh device in the Kubernetes platform; The first recording unit is configured to cache the traffic data of the first protocol obtained by the diversion to a first local storage; the first protocol is the brpc protocol; The second recording unit is used to cache the traffic data of the second protocol obtained by diversion to the second local storage; the second protocol is the mcpack protocol.

2. The system according to claim 1, further comprising: A cloud storage transmission unit, configured to periodically upload the traffic data cached in the first local storage and the second local storage to the cloud storage; The offline data pulling unit is used to pull traffic data from the cloud storage and perform preset processing to obtain test data for the map service.

3. The system according to claim 1, wherein: The traffic scheduling unit is further configured to: Determine whether the traffic data of the obtained map service exceeds the preset quota; If so, discard part of the traffic data.

4. A method for recording map service traffic on a cloud native platform, comprising: Obtaining traffic data of a map service copied and directed from a cloud native platform; wherein the cloud native platform is a K8S platform, and the traffic data of the map service is copied and directed by a Service-Mesh device in the K8S platform; Divert traffic data based on protocol type, cache the diverted traffic data of the first protocol to a first local storage, and cache the diverted traffic data of the second protocol to a second local storage; the first protocol is brpc, and the second protocol is mcpack.

5. The method according to claim 4, further comprising: The traffic data cached in the first local storage and the second local storage are periodically uploaded to the cloud storage, so that the cloud storage sends the traffic data in the cloud storage to the test terminal after receiving the pull request sent by the test terminal.

6. The method according to claim 4, further comprising: Determine whether the traffic data of the obtained map service exceeds the preset quota; If so, discard part of the traffic data.

7. A server comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 4 to 6.

8. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 4 to 6.

9. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Call center recording cloud storage method and system, equipment and storage medium

    CN108259585A

  • Method and device for controlling flow

    CN110430142A

  • Storage reservation method, device and equipment and readable medium

    CN112130757A