Data conversion method and device, storage medium and electronic equipment

By using eBPF technology to automatically load target conversion data files in Linux systems, the problem of low performance in Linux systems when processing business functions is solved, efficient conversion and processing of stateless data is achieved, and device performance is improved.

CN119536846APending Publication Date: 2025-02-28GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411696594.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-25
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

In the prior art, Linux systems have low performance when processing business functions and low processing efficiency for stateless data.

Method used

The target conversion data file is automatically loaded using eBPF technology, converting the stateless data sent by the smart device from the first format to the second format, and using eBPF technology and auxiliary programs to automatically load the so file or other convertible data files of the specified file, complete the data conversion, and automatically load the latest file when the file changes.

Benefits of technology

It improves processing speed and I/O performance, improves the business functional performance of Linux devices, meets application needs, and solves the problem of low Linux system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119536846A_ABST
    Figure CN119536846A_ABST
Patent Text Reader

Abstract

The invention provides a data conversion method and device, a storage medium and electronic equipment, and the method comprises the steps: receiving stateless data sent by intelligent equipment, the stateless data at least comprises operation data of the intelligent equipment, and the format of the stateless data is a first format; automatically loading a target conversion data file by adopting an eBPF technology, wherein the target conversion data file is a data conversion file for converting data from a first format to a second format; the format of the stateless data is converted through the target conversion data file, target data is obtained, and the format of the target data is the second format. According to the method, the so file or other convertible data files of the specified file are automatically loaded through the eBPF technology and the auxiliary program, and the effect of improving the service function performance of the Linux equipment with lower performance is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of device networking cloud services, and more specifically, to a data conversion method, a data conversion device, a computer-readable storage medium, and an electronic device. Background Art

[0002] In the data center environment, the hardware form of servers, storage devices, network devices and other equipment tends to be miniaturized, lightweight and cost-optimized. Multi-core processors, SSD hard drives, high-speed network interfaces and other components are integrated in a limited physical space, and equipped with a small amount of memory to provide computing resources, storage resources and network resources for server clusters, greatly saving deployment space and costs. Due to limited hardware resources, the data processing capabilities of low-performance Linux systems are limited and cannot meet the needs of large-scale data conversion.

[0003] For low-performance Linux systems, data conversion can be achieved by using simulators. For example, by establishing a virtual machine's hardware and software environment, the operation of devices in a real environment can be simulated. This method can achieve data conversion to a greater extent, but it requires a large amount of hardware resources, resulting in the consumption of server cluster storage, network, computing and other resources, which not only increases the deployment cost, but also affects the performance of the server cluster.

[0004] In addition, due to the limited processing power of low-performance Linux systems, for a large number of concurrent streaming data conversion requests, the traditional method requires caching the input data in memory or disk before processing, which will cause a large consumption of memory or disk resources, while taking up a lot of processing time and CPU resources, resulting in insufficient data conversion performance. Summary of the invention

[0005] The main purpose of the present application is to provide a data conversion method, a data conversion device, a computer-readable storage medium and an electronic device, so as to at least solve the problems in the prior art that the Linux system has low performance when processing business functions and low processing efficiency for stateless data.

[0006] In order to achieve the above-mentioned purpose, according to one aspect of the present application, a data conversion method is provided, including: receiving stateless data sent by an intelligent device, the stateless data at least including operation data of the intelligent device, and the format of the stateless data is a first format; using eBPF technology to automatically load a target conversion data file, the target conversion data file is a data conversion file that converts data from a first format to a second format; using the target conversion data file to convert the format of the stateless data to obtain target data, and the format of the target data is a second format.

[0007] Optionally, the target conversion data file is automatically loaded using eBPF technology, including: obtaining an initial conversion data file, and determining whether the initial conversion data file needs to update version information; when the initial conversion data file does not need to update version information, determining the initial conversion data file as the target conversion data file, and automatically loading the target conversion data file using eBPF technology; when the initial conversion data file needs to update version information, automatically loading the new version data of the initial conversion data file using eBPF technology to update the version information of the initial conversion data file to obtain the target conversion data file.

[0008] Optionally, determining whether the initial conversion data file needs to update version information includes: obtaining the latest modification timestamp of the initial conversion data file, the latest modification timestamp being the timestamp when the initial conversion data file was last modified; comparing the latest modification timestamp of the initial conversion data file with a preset time threshold; and determining that the initial conversion data file needs to update version information if the latest modification timestamp of the initial conversion data file is earlier than the preset time threshold.

[0009] Optionally, determining whether the initial conversion data file needs to update version information includes: obtaining a current version number of the initial conversion data file; comparing the current version number of the initial conversion data file with a preset version number; and determining that the initial conversion data file needs to update version information when the current version number of the initial conversion data file is less than the preset version number.

[0010] Optionally, before automatically loading the target conversion data file using the eBPF technology, the method further includes: obtaining file names of multiple initial conversion data files; obtaining a first mapping relationship, the first mapping relationship being a mapping relationship between the file names of the initial conversion data files and a data conversion type, the data conversion type being a format type of data that can be converted by the initial conversion data file, the data conversion type including a pre-conversion format and a post-conversion format; and determining, according to the first format, the second format and the first mapping relationship, the initial conversion data file whose file name corresponds to the first format and the second format is the target file name as the target conversion data file.

[0011] Optionally, before automatically loading the target conversion data file using eBPF technology, the method also includes: obtaining preset test data and an initial conversion data file, the preset test data including multiple groups of test input values ​​and test output values ​​corresponding to the initial conversion data file; inputting the test input value into the initial conversion data file to obtain an actual output value; and when the actual output value is the same as the test output value corresponding to the test input value, determining that the initial conversion data file is the target conversion data file.

[0012] Optionally, receiving the stateless data sent by the smart device includes: when the smart device is connected to a Linux server via a long connection, receiving the stateless data sent by the smart device.

[0013] According to another aspect of the present application, a data conversion device is provided, including: a receiving unit, used to receive stateless data sent by an intelligent device, the stateless data at least including operation data of the intelligent device, and the format of the stateless data is a first format; a loading unit, used to automatically load a target conversion data file using eBPF technology, the target conversion data file is a data conversion file that converts data from a first format to a second format; a conversion unit, used to convert the format of the stateless data using the target conversion data file to obtain target data, and the format of the target data is a second format.

[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the data conversion methods.

[0015] According to another aspect of the present application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing any one of the data conversion methods.

[0016] Applying the technical solution of the present application, the above-mentioned data conversion method first receives the stateless data sent by the intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is the first format; then the eBPF technology is used to automatically load the target conversion data file, and the target conversion data file is a data conversion file that converts the data from the first format to the second format; finally, the target conversion data file is used to convert the format of the stateless data to obtain the target data, and the format of the target data is the second format. The method uses eBPF technology and auxiliary programs to automatically load the so file or other convertible data file of the specified file to complete the conversion of the stateless data. At the same time, when the so file or other convertible data file changes, the latest file is automatically loaded, which improves the processing speed and I / O performance, thereby improving the business function performance of the Linux device, meeting application requirements, and solving the problems of low performance of the Linux system in processing business functions and low processing efficiency of stateless data in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings constituting part of the present application are used to provide a further understanding of the present application. The exemplary embodiments and descriptions of the present application are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0018] Figure 1 A hardware structure block diagram of a mobile terminal for executing a data conversion method provided in an embodiment of the present application is shown;

[0019] Figure 2 A schematic diagram of a data conversion method according to an embodiment of the present application is shown;

[0020] Figure 3 A schematic diagram of a flow chart of another data conversion method provided according to an embodiment of the present application is shown;

[0021] Figure 4 A structural block diagram of a data conversion device provided according to an embodiment of the present application is shown.

[0022] The above drawings include the following reference numerals:

[0023] 102, processor; 104, memory; 106, transmission device; 108, input and output devices. DETAILED DESCRIPTION

[0024] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0025] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

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

[0027] As introduced in the background technology, in the prior art, for low-performance Linux systems, data conversion is currently achieved by means of a simulator. For example, by establishing the software and hardware environment of a virtual machine, the operation of equipment in a real environment is simulated. This method can achieve data conversion to a greater extent, but requires a large amount of hardware resources, resulting in consumption of server cluster storage, network, computing and other resources, which not only increases the deployment cost, but also affects the performance of the server cluster. In order to solve the problems in the prior art that the Linux system has low performance when processing business functions and low efficiency in processing stateless data, the embodiments of the present application provide a data conversion method, a data conversion device, a computer-readable storage medium and an electronic device.

[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0029] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal of a data conversion method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0030] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the data conversion method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above method is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories can be connected to the mobile terminal via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The transmission device 106 is used to receive or send data via a network. The above-mentioned specific examples of the network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] In this embodiment, a data conversion method running on a mobile terminal, a computer terminal or a similar computing device is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] Figure 2 is a flow chart of a data conversion method according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:

[0033] Step S201, receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format;

[0034] Specifically, stateless design is often used to improve the scalability and performance of the system because it reduces the complexity of the system in processing requests and also makes it easier for the system to scale horizontally, that is, to process more requests by increasing the number of servers without the need for complex session state synchronization mechanisms.

[0035] Stateless data refers to data that does not depend on historical interactions or session states during processing. In computer networks and software engineering, the concept of statelessness is often used to describe that services or protocols do not need to maintain any information about previous requests when processing requests, which means that each request is processed independently and does not depend on the results or status of the previous request.

[0036] In specific technical scenarios, stateless data can refer to information that does not need to save the session state during processing, such as query parameters in HTTP GET requests. Because GET requests are stateless, the server starts from scratch each time it processes a GET request without considering the previous state.

[0037] The step of receiving the stateless data sent by the smart device includes: when the smart device is connected to the Linux server via a long connection, receiving the stateless data sent by the smart device.

[0038] Specifically, smart devices use long links to connect to Linux servers, which can keep them online for a long time after the connection is established, without frequent establishment and disconnection, thus reducing latency. In addition, Linux servers support concurrent connections, improving scalability. Among them, smart devices include air conditioners, smart home appliances, etc.

[0039] In an optional solution, stateless data can be some data packets or information that can be converted independently, and their conversion process does not depend on the state or result of the previous conversion, so eBPF technology and dynamically loaded so files (shared library files) or other convertible data files can be used for efficient processing and conversion. The stateless data in this application includes operating parameters.

[0040] Step S202, using eBPF technology to automatically load a target conversion data file, where the target conversion data file is a data conversion file that converts data from a first format to a second format;

[0041] Specifically, eBPF technology can reduce context switching between user state and kernel state during data conversion, thereby improving processing speed; in terms of resource consumption, eBPF programs can run directly in the kernel and have high execution efficiency, so their CPU utilization is usually low; in addition, eBPF programs can use the zero-copy technology provided by the kernel to reduce data copy overhead, thereby improving I / O performance, reducing latency, and improving processing efficiency.

[0042] eBPF (extended Berkeley Packet Filter) is a technology for high-performance network packet filtering and processing on Linux systems. It allows users to write and run custom programs in kernel space to filter, forward, monitor and modify network packets without modifying kernel code. eBPF technology can be used to implement various network functions, such as firewalls, load balancing, traffic analysis, etc., and has the advantages of low overhead, high efficiency and security.

[0043] Among them, the eBPF technology is used to automatically load the target conversion data file, including the following steps:

[0044] Step S301, obtaining an initial conversion data file, and determining whether the initial conversion data file needs to update version information;

[0045] Step S302, when the initial conversion data file does not need to update version information, determining the initial conversion data file as the target conversion data file, and automatically loading the target conversion data file using eBPF technology;

[0046] Step S303, when the version information of the initial conversion data file needs to be updated, the new version data of the initial conversion data file is automatically loaded using the eBPF technology to update the version information of the initial conversion data file to obtain the target conversion data file.

[0047] Specifically, eBPF technology is used to achieve dynamic and efficient file management, reduce user-state and kernel-state switching, and improve execution efficiency; determine whether the initial conversion data file needs to update version information, improve data accuracy and consistency, and avoid using expired information.

[0048] The target conversion data file is a so file or other conversion data file, where the so file is the extension of a sharedobject file, which refers to a shared library file. In the Linux system, the so file is used to share code and can be dynamically loaded and used by multiple programs. The so file supports on-demand loading of specific conversion logic, which can save memory; moreover, multiple programs can use the same so file at the same time, without the need to maintain independent copies, reducing development and maintenance costs.

[0049] Furthermore, through eBPF technology and auxiliary programs, so files or other convertible data files in a specified file name format are loaded in a configurable directory. The specific implementation steps are: select a writing language, such as C language, write an eBPF program, and compile the program into a code format that can be understood and executed; use libbpf or other similar libraries to load the eBPF program into the kernel; once the ebpf program is loaded into the kernel and monitoring points are added, it can collect and process data. At the same time, the ebpf program can load so library files and other convertible data files through auxiliary programs, and share data through ebpf maps. Among them, libbpf is the core user-state library of the eBPF ecosystem, which is used to simplify the loading and kernel interaction process of eBPF programs.

[0050] Determining whether the initial conversion data file needs to update version information includes the following steps:

[0051] Step S3011, obtaining the current version number of the above initial conversion data file;

[0052] Step S3012, comparing the current version number of the initial conversion data file with the preset version number;

[0053] Step S3013: When the current version number of the initial conversion data file is smaller than the preset version number, it is determined that the initial conversion data file needs to update version information.

[0054] Specifically, by comparing the current version number with the preset version number, it is possible to accurately determine whether the initial conversion data file needs to update version information, avoid resource waste, ensure that the loaded data file always meets the requirements of the target version number, and ensure the accuracy and consistency of subsequent data conversion.

[0055] Before automatically loading the target conversion data file using the eBPF technology, the method further includes the following steps:

[0056] Step S401, obtaining file names of multiple initial conversion data files;

[0057] Step S402, obtaining a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the file name of the initial conversion data file and a data conversion type, wherein the data conversion type is a format type of data that can be converted by the initial conversion data file, and the data conversion type includes a format before conversion and a format after conversion;

[0058] Step S403: According to the first format, the second format and the first mapping relationship, the initial conversion data file having a file name corresponding to the first format and the second format as a target file name is determined as the target conversion data file.

[0059] Specifically, the first mapping relationship clarifies the format conversion tasks that each file can complete, and supports matching processing between formats; based on the above mapping relationship, the matching of the initial data file to the target data file is completed, so that the entire data conversion process has a clear output direction, and the target conversion data (such as file generation time and file name) meets the file format requirements to achieve accurate file conversion. For files that meet the format requirements, the eBPF technology is used to automatically load the latest files and continue to execute the corresponding business functions; files that do not meet the requirements are not allowed to be loaded.

[0060] Before automatically loading the target conversion data file using the eBPF technology, the method further includes the following steps:

[0061] Step S501, obtaining preset test data and an initial conversion data file, wherein the preset test data includes a plurality of groups of test input values ​​and test output values ​​corresponding to the initial conversion data file;

[0062] Step S502, inputting the test input value into the initial conversion data file to obtain the actual output value;

[0063] Step S503: when the actual output value is the same as the test output value corresponding to the test input value, determining the initial conversion data file as the target conversion data file.

[0064] Specifically, obtaining the test input value, output value and actual output value is another conversion rule to complete the initial data file to the target data file. According to the format conversion rule, it can ensure that the file conversion data (such as file generation time and file name) meets the expected results to achieve accurate file conversion. For files that meet the expected results, the eBPF technology is used to automatically load the latest files and continue to execute the corresponding business functions; files that do not meet the requirements are not allowed to be loaded.

[0065] Step S203: convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

[0066] Specifically, after completing the file selection, the eBPF technology is combined to convert the stateless data into the format required by other devices or users, realizing efficient data packet processing, system monitoring, and security policy execution, thereby improving the business performance of the device.

[0067] Furthermore, only the so files or other convertible data files that meet the requirements will be loaded successfully using the eBPF technology and auxiliary programs. In an optional solution, the stateless data is a binary file, and after conversion, the smart device receiving end is deasin (custom data format).

[0068] The above-mentioned data conversion method of the present application first receives stateless data sent by an intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is a first format; then the eBPF technology is used to automatically load the target conversion data file, and the target conversion data file is a data conversion file that converts data from the first format to the second format; finally, the target conversion data file is used to convert the format of the stateless data to obtain the target data, and the format of the target data is a second format. The method uses eBPF technology and auxiliary programs to automatically load the so file or other convertible data file of the specified file to complete the conversion of the stateless data. At the same time, when the so file or other convertible data file changes, the latest file is automatically loaded, which improves the processing speed and I / O performance, thereby improving the business function performance of the Linux device, meeting application requirements, and solving the problems of low performance of the Linux system in processing business functions and low processing efficiency of stateless data in the prior art.

[0069] The specific process of the above data conversion method is as follows Figure 3As shown, before loading the so file or other convertible data file, it is necessary to first determine whether the file meets the design requirements. You can first use preset data to test whether the stateless data conversion of the so file or other convertible data file meets the expected results. If it does not meet the expected results, the loading is not allowed to succeed; only the so file or other convertible data file that meets the requirements will be successfully loaded using the eBPF technology and auxiliary program. If the so file or other convertible data file meets the requirements, put the so file or other convertible data file in the specified directory, and load the so file or other convertible data file in the specified file name format in the specified directory through the eBPF technology and auxiliary program. When the device is connected to the Linux server through a long connection, the stateless data it sends can be determined by the so file or other convertible data file name to determine which file the device needs to convert through; after selecting the file, the stateless data can be converted into the format required by other devices or users, and finally the conversion result is output and passed to the user. The above embodiment uses eBPF technology to automatically load the so file or other convertible data file of the specified file through an auxiliary program to complete the rapid conversion of stateless data; when the so file or other convertible data file changes, the latest file is automatically loaded according to certain conversion rules based on information such as file update time and file version; the requirement of dynamically loading Linux business functions using convertible data files is achieved, thereby achieving performance improvement of business functions of low-performance Linux devices.

[0070] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0071] The present application embodiment also provides a kind of data conversion device, it should be noted that the data conversion device of the present application embodiment can be used for executing the data conversion method provided by the present application embodiment. The device is used to realize the above-mentioned embodiment and preferred implementation mode, and the description has been made no more. As used below, the term "module" can realize the combination of software and / or hardware of predetermined function. Although the device described in the following embodiments is preferably realized with software, the realization of hardware, or the combination of software and hardware is also possible and conceived.

[0072] The following is an introduction to the data conversion device provided in the embodiments of the present application.

[0073] Figure 4 Schematic diagram of a data conversion device according to an embodiment of the present application. Figure 4As shown, the device includes: a receiving unit 10, a loading unit 20 and a conversion unit 30, the receiving unit 10 is used to receive stateless data sent by the intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is the first format; the loading unit 20 is used to automatically load the target conversion data file using the eBPF technology, and the target conversion data file is a data conversion file that converts data from the first format to the second format; the conversion unit 30 is used to convert the format of the stateless data using the target conversion data file to obtain target data, and the format of the target data is the second format.

[0074] The above-mentioned data conversion device of the present application includes: a receiving unit, a loading unit and a conversion unit, the receiving unit is used to receive the stateless data sent by the intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is a first format; the loading unit is used to automatically load the target conversion data file using the eBPF technology, and the target conversion data file is a data conversion file that converts data from the first format to the second format; the conversion unit is used to convert the format of the stateless data using the target conversion data file to obtain the target data, and the format of the target data is a second format. The device uses the eBPF technology and auxiliary program to automatically load the so file or other convertible data file of the specified file to complete the conversion of the stateless data. At the same time, when the so file or other convertible data file changes, the latest file is automatically loaded, which improves the processing speed and I / O performance, thereby improving the business function performance of the Linux device, improving the processing speed and I / O performance, meeting the application requirements, and solving the problem of low performance of the Linux system in processing business functions and low processing efficiency of stateless data in the prior art.

[0075] In some examples, the receiving unit is used to receive stateless data sent by the smart device, including: when the smart device is connected to the Linux server via a long connection, receiving the stateless data sent by the smart device. In this way, the connection can be kept online for a long time after it is established, without frequent establishment and disconnection of the connection, thereby reducing latency. In addition, the Linux server supports concurrent connections to improve scalability.

[0076] In some instances, the loading unit includes a first loading module, a second loading module, and a third loading module. The first loading module is used to obtain the initial conversion data file and determine whether the initial conversion data file needs to update version information; the second loading module is used to determine the initial conversion data file as the target conversion data file when the initial conversion data file does not need to update version information, and automatically load the target conversion data file using eBPF technology; the third loading module is used to automatically load the new version data of the initial conversion data file using eBPF technology when the initial conversion data file needs to update version information, so as to update the version information of the initial conversion data file to obtain the target conversion data file. Dynamic and efficient file management is achieved through eBPF technology, reducing user mode and kernel mode switching and improving execution efficiency; judging whether the initial conversion data file needs to update version information, improving data accuracy and consistency, and avoiding the use of expired information.

[0077] In some examples, the first loading module further includes a first loading submodule, a second loading submodule and a third loading submodule, wherein the first loading submodule is used to obtain the current version number of the initial conversion data file; the second loading submodule is used to compare the current version number of the initial conversion data file with the preset version number; and the third loading submodule is used to determine that the initial conversion data file needs to update the version information when the current version number of the initial conversion data file is less than the preset version number. In this way, it is possible to accurately determine whether the initial conversion data file needs to update the version information, avoid resource waste, ensure that the loaded data file always meets the requirements of the target version number, and ensure the accuracy and consistency of subsequent data conversion.

[0078] In some examples, the loading unit further includes a fourth loading module, a fifth loading module and a sixth loading module, wherein the fourth loading module is used to obtain the file names of multiple initial conversion data files; the fifth loading module is used to obtain a first mapping relationship, wherein the first mapping relationship is a mapping relationship between the file names of the initial conversion data files and the data conversion type, wherein the data conversion type is a format type of data that can be converted by the initial conversion data files, and the data conversion type includes a pre-conversion format and a post-conversion format; and the sixth loading module is used to determine the initial conversion data file whose file name corresponding to the first format and the second format is the target file name as the target conversion data file according to the first format, the second format and the first mapping relationship. In this way, the entire data conversion process has a clear output orientation, so that the target conversion data meets the file format requirements, so as to achieve accurate file conversion.

[0079] In some examples, the loading unit further includes a seventh loading module, an eighth loading module and a ninth loading module, the seventh loading module is used to obtain preset test data and an initial conversion data file, the preset test data includes a plurality of groups of corresponding test input values ​​and test output values ​​of the initial conversion data file; the eighth loading module is used to input the test input value into the initial conversion data file to obtain an actual output value; the ninth loading module is used to determine that the initial conversion data file is the target conversion data file when the actual output value is the same as the test output value corresponding to the test input value. In this way, it can be ensured that the file conversion data (meets the expected result to achieve accurate file conversion.

[0080] The data conversion device includes a processor and a memory, and the receiving unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to implement corresponding functions. The modules are all located in the same processor; or, the modules are located in different processors in any combination.

[0081] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set to adjust kernel parameters to solve the problem of low performance of Linux system in processing business functions and low efficiency in processing stateless data in the prior art.

[0082] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0083] An embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the data conversion method.

[0084] Specifically, the data conversion method includes:

[0085] Step S201, receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format;

[0086] Specifically, stateless design is often used to improve the scalability and performance of the system because it reduces the complexity of the system in processing requests and also makes it easier for the system to scale horizontally, that is, to process more requests by increasing the number of servers without the need for complex session state synchronization mechanisms.

[0087] Step S202, using eBPF technology to automatically load a target conversion data file, where the target conversion data file is a data conversion file that converts data from a first format to a second format;

[0088] Specifically, eBPF technology can reduce context switching between user state and kernel state during data conversion, thereby improving processing speed; in terms of resource consumption, eBPF programs can run directly in the kernel and have high execution efficiency, so their CPU utilization is usually low; in addition, eBPF programs can use the zero-copy technology provided by the kernel to reduce data copy overhead, thereby improving I / O performance, reducing latency, and improving processing efficiency.

[0089] Step S203: convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

[0090] Specifically, after completing the file selection, the eBPF technology is combined to convert the stateless data into the format required by other devices or users, realizing efficient data packet processing, system monitoring, and security policy execution, thereby improving the business performance of the device.

[0091] Optionally, the target conversion data file is automatically loaded using eBPF technology, including: obtaining an initial conversion data file, and determining whether the initial conversion data file needs to update version information; if the initial conversion data file does not need to update version information, determining the initial conversion data file as the target conversion data file, and automatically loading the target conversion data file using eBPF technology; if the initial conversion data file needs to update version information, automatically loading the new version data of the initial conversion data file using eBPF technology to update the version information of the initial conversion data file to obtain the target conversion data file.

[0092] Optionally, determining whether the above-mentioned initial conversion data file needs to update version information includes: obtaining the latest modification timestamp of the above-mentioned initial conversion data file, the above-mentioned latest modification timestamp is the timestamp when the above-mentioned initial conversion data file was last modified; comparing the latest modification timestamp of the above-mentioned initial conversion data file with a preset time threshold; if the latest modification timestamp of the above-mentioned initial conversion data file is earlier than the above-mentioned preset time threshold, determining that the above-mentioned initial conversion data file needs to update version information.

[0093] Optionally, determining whether the above-mentioned initial conversion data file needs to update version information includes: obtaining the current version number of the above-mentioned initial conversion data file; comparing the current version number of the above-mentioned initial conversion data file with the preset version number; if the current version number of the above-mentioned initial conversion data file is less than the above-mentioned preset version number, determining that the above-mentioned initial conversion data file needs to update version information.

[0094] Optionally, before automatically loading the target conversion data file using the eBPF technology, the method further includes: obtaining file names of multiple initial conversion data files; obtaining a first mapping relationship, the first mapping relationship being a mapping relationship between the file names of the initial conversion data files and a data conversion type, the data conversion type being a format type of data that can be converted by the initial conversion data file, the data conversion type including a pre-conversion format and a post-conversion format; according to the first format, the second format and the first mapping relationship, determining the initial conversion data file whose file name corresponds to the first format and the second format as the target file name as the target conversion data file.

[0095] Optionally, before automatically loading the target conversion data file using the eBPF technology, the method further includes: obtaining preset test data and an initial conversion data file, the preset test data including a plurality of groups of test input values ​​and test output values ​​corresponding to the initial conversion data file; inputting the test input value into the initial conversion data file to obtain an actual output value; and determining that the initial conversion data file is the target conversion data file when the actual output value is the same as the test output value corresponding to the test input value.

[0096] Optionally, receiving the stateless data sent by the smart device includes: when the smart device is connected to the Linux server via a long connection, receiving the stateless data sent by the smart device.

[0097] An embodiment of the present invention provides a processor, and the processor is used to run a program, wherein the data conversion method is executed when the program is run.

[0098] Specifically, the data conversion method includes:

[0099] Step S201, receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format;

[0100] Specifically, stateless design is often used to improve the scalability and performance of the system because it reduces the complexity of the system in processing requests and also makes it easier for the system to scale horizontally, that is, to process more requests by increasing the number of servers without the need for complex session state synchronization mechanisms.

[0101] Step S202, using eBPF technology to automatically load a target conversion data file, where the target conversion data file is a data conversion file that converts data from a first format to a second format;

[0102] Specifically, eBPF technology can reduce context switching between user state and kernel state during data conversion, thereby improving processing speed; in terms of resource consumption, eBPF programs can run directly in the kernel and have high execution efficiency, so their CPU utilization is usually low; in addition, eBPF programs can use the zero-copy technology provided by the kernel to reduce data copy overhead, thereby improving I / O performance, reducing latency, and improving processing efficiency.

[0103] Step S203: convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

[0104] Specifically, after completing the file selection, the eBPF technology is combined to convert the stateless data into the format required by other devices or users, realizing efficient data packet processing, system monitoring, and security policy execution, thereby improving the business performance of the device.

[0105] An embodiment of the present invention provides a device, the device including a processor, a memory, and a program stored in the memory and executable on the processor, and when the processor executes the program, at least the following steps are implemented:

[0106] Step S201, receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format;

[0107] Specifically, stateless design is often used to improve the scalability and performance of the system because it reduces the complexity of the system in processing requests and also makes it easier for the system to scale horizontally, that is, to process more requests by increasing the number of servers without the need for complex session state synchronization mechanisms.

[0108] Step S202, using eBPF technology to automatically load a target conversion data file, where the target conversion data file is a data conversion file that converts data from a first format to a second format;

[0109] Specifically, eBPF technology can reduce context switching between user state and kernel state during data conversion, thereby improving processing speed; in terms of resource consumption, eBPF programs can run directly in the kernel and have high execution efficiency, so their CPU utilization is usually low; in addition, eBPF programs can use the zero-copy technology provided by the kernel to reduce data copy overhead, thereby improving I / O performance, reducing latency, and improving processing efficiency.

[0110] Step S203: convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

[0111] Specifically, after completing the file selection, the eBPF technology is combined to convert the stateless data into the format required by other devices or users, realizing efficient data packet processing, system monitoring, and security policy execution, thereby improving the business performance of the device.

[0112] The devices in this article can be servers, PCs, PADs, mobile phones, etc.

[0113] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program for initializing at least the following method steps:

[0114] Step S201, receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format;

[0115] Specifically, stateless design is often used to improve the scalability and performance of the system because it reduces the complexity of the system in processing requests and also makes it easier for the system to scale horizontally, that is, to process more requests by increasing the number of servers without the need for complex session state synchronization mechanisms.

[0116] Step S202, using eBPF technology to automatically load a target conversion data file, where the target conversion data file is a data conversion file that converts data from a first format to a second format;

[0117] Specifically, eBPF technology can reduce context switching between user state and kernel state during data conversion, thereby improving processing speed; in terms of resource consumption, eBPF programs can run directly in the kernel and have high execution efficiency, so their CPU utilization is usually low; in addition, eBPF programs can use the zero-copy technology provided by the kernel to reduce data copy overhead, thereby improving I / O performance, reducing latency, and improving processing efficiency.

[0118] Step S203: convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

[0119] Specifically, after completing the file selection, the eBPF technology is combined to convert the stateless data into the format required by other devices or users, realizing efficient data packet processing, system monitoring, and security policy execution, thereby improving the business performance of the device.

[0120] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0121] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0122] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0123] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0124] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0125] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0126] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0127] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0128] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0129] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:

[0130] 1) The above-mentioned data conversion method of the present application first receives the stateless data sent by the intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is the first format; then the eBPF technology is used to automatically load the target conversion data file, and the target conversion data file is a data conversion file that converts the data from the first format to the second format; finally, the target conversion data file is used to convert the format of the stateless data to obtain the target data, and the format of the target data is the second format. The method uses eBPF technology and auxiliary programs to automatically load the so file or other convertible data file of the specified file to complete the conversion of the stateless data. At the same time, when the so file or other convertible data file changes, the latest file is automatically loaded, which improves the processing speed and I / O performance, thereby improving the business function performance of the Linux device, meeting application requirements, and solving the problems of low performance of the Linux system in processing business functions and low processing efficiency of stateless data in the prior art.

[0131] 2) The above-mentioned data conversion device of the present application includes: a receiving unit, a loading unit and a conversion unit, the receiving unit is used to receive the stateless data sent by the intelligent device, the stateless data at least includes the operation data of the intelligent device, and the format of the stateless data is the first format; the loading unit is used to automatically load the target conversion data file using the eBPF technology, and the target conversion data file is a data conversion file that converts data from the first format to the second format; the conversion unit is used to convert the format of the stateless data using the target conversion data file to obtain the target data, and the format of the target data is the second format. The device uses the eBPF technology and auxiliary programs to automatically load the so file or other convertible data files of the specified file to complete the conversion of the stateless data. At the same time, when the so file or other convertible data file changes, the latest file is automatically loaded, which improves the processing speed and I / O performance, thereby improving the business function performance of the Linux device, meeting the application requirements, and solving the problems of low performance of the Linux system in processing business functions and low processing efficiency of stateless data in the prior art.

[0132] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A data conversion method, characterized in that: include: Receiving stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format; Automatically loading a target conversion data file using eBPF technology, wherein the target conversion data file is a data conversion file that converts data from a first format to a second format; The target conversion data file is used to convert the format of the stateless data to obtain target data, where the format of the target data is a second format.

2. The method according to claim 1, characterized in that Use eBPF technology to automatically load target conversion data files, including: Obtaining an initial conversion data file, and determining whether the initial conversion data file needs to update version information; In the case where the initial conversion data file does not need to update version information, determining the initial conversion data file as the target conversion data file, and automatically loading the target conversion data file using eBPF technology; In the case where the initial conversion data file needs to update version information, the new version data of the initial conversion data file is automatically loaded using eBPF technology to update the version information of the initial conversion data file to obtain the target conversion data file.

3. The method according to claim 2, characterized in that Determining whether the initial conversion data file needs to update version information includes: Obtaining the latest modification timestamp of the initial conversion data file, where the latest modification timestamp is the timestamp when the initial conversion data file was last modified; Comparing the latest modification timestamp of the initial conversion data file with a preset time threshold; When the latest modification timestamp of the initial conversion data file is earlier than the preset time threshold, it is determined that the initial conversion data file needs to update version information.

4. The method according to claim 2, characterized in that: Determining whether the initial conversion data file needs to update version information includes: Obtaining the current version number of the initial conversion data file; Comparing the current version number of the initial conversion data file with the preset version number; When the current version number of the initial conversion data file is smaller than the preset version number, it is determined that the initial conversion data file needs to update version information.

5. The method according to claim 1, characterized in that Before automatically loading the target conversion data file using the eBPF technology, the method further includes: Get the file names of multiple initial conversion data files; Acquire a first mapping relationship, where the first mapping relationship is a mapping relationship between the file name of the initial conversion data file and a data conversion type, where the data conversion type is a format type of data that can be converted by the initial conversion data file, and the data conversion type includes a pre-conversion format and a post-conversion format; According to the first format, the second format and the first mapping relationship, the initial conversion data file whose file name corresponding to the first format and the second format is a target file name is determined as the target conversion data file.

6. The method according to claim 1, characterized in that Before automatically loading the target conversion data file using the eBPF technology, the method further includes: Acquire preset test data and an initial conversion data file, wherein the preset test data includes a plurality of groups of test input values ​​and test output values ​​corresponding to the initial conversion data file; Inputting the test input value into the initial conversion data file to obtain an actual output value; In a case where the actual output value is identical to the test output value corresponding to the test input value, the initial conversion data file is determined to be the target conversion data file.

7. The method according to claim 1, characterized in that Receive stateless data sent by smart devices, including: When the smart device is connected to the Linux server via a long connection, the stateless data sent by the smart device is received.

8. A data conversion device, characterized in that: include: A receiving unit, configured to receive stateless data sent by a smart device, wherein the stateless data at least includes operation data of the smart device, and the format of the stateless data is a first format; A loading unit, configured to automatically load a target conversion data file using the eBPF technology, wherein the target conversion data file is a data conversion file that converts data from a first format to a second format; The conversion unit is used to convert the format of the stateless data using the target conversion data file to obtain target data, where the format of the target data is a second format.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the data conversion method according to any one of claims 1 to 7.

10. An electronic device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the one or more programs include a method for executing the data conversion method described in any one of claims 1 to 7.