Industrial application configuration data transmission method and system, computer equipment and medium

By performing plug-in installation and slicing and compression processing of configuration data in industrial applications, the problem of excessive consumption of configuration data transmission bandwidth and access traffic is solved, and fast and efficient data transmission and application experience are improved.

CN119621087APending Publication Date: 2025-03-14CISDI INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411842565.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-13
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

As business complexity increases, the volume of industrial application configuration data expands, resulting in increased storage pressure, slowing loading speed, and excessive consumption of mobile access traffic, affecting development and usage experience.

Method used

Plug-in installation is performed through pre- or real-time determined software development tools, and the sharding policy and compression policy are selected based on the plug-in installation results and configuration data parameters, and the configuration data is sharded and multi-threaded concurrent compression is performed, and the data is uploaded and decompressed.

Benefits of technology

It realizes fast and high compression ratio compression of industrial configuration data, adaptive sharding and compression strategies based on data conditions, reducing the bandwidth of configuration data transmission and mobile access traffic overhead, thereby improving application development and usage experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621087A_ABST
    Figure CN119621087A_ABST
Patent Text Reader

Abstract

The invention provides an industrial application configuration data transmission method and system, computer equipment and a medium, and the method comprises the steps: carrying out the plug-in installation through a software development tool, then selecting a fragmentation strategy and a compression strategy according to a plug-in installation result and industrial application configuration data parameters, and carrying out the fragmentation of industrial application configuration data based on the fragmentation strategy; performing multi-thread concurrent compression on each piece of fragmented data based on a compression strategy, and uploading all compressed data; and finally, decompressing all the compressed data according to the fragmentation strategy and the compression strategy, and outputting a corresponding decompression result. According to the method, rapid and high-compression-ratio compression of the industrial configuration data can be realized, the fragmentation and compression strategies can be self-adapted according to the configuration data condition, concurrent compression and decompression can be performed on different fragments, the bandwidth of configuration data transmission and the access traffic overhead of a mobile terminal are reduced on the premise of almost not influencing the original performance and process, and the data transmission efficiency is improved. Therefore, the application development and use experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an industrial application configuration data transmission method and system, computer equipment and medium. Background Art

[0002] In the actual production process, most industrial application interfaces and interactions are similar, and the development of different business applications can often be completed by a set of code + different configuration data.

[0003] However, as business complexity increases, the volume of configuration data gradually expands, resulting in increased storage pressure on business industrial application configuration data, longer preservation time, and increased probability of failure, which slows down the loading speed on the computer side and consumes too much access traffic on the mobile side. It is easy to have problems such as application whiteboards and long loading times, which affects the development and usage experience of business applications. Summary of the invention

[0004] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide an industrial application configuration data transmission method and system, computer equipment and medium, so as to solve the technical problems existing in the prior art.

[0005] To achieve the above-mentioned object and other related objects, the present invention provides an industrial application configuration data transmission method, comprising the following steps:

[0006] Plug-in installation via software development tools determined in advance or on the fly;

[0007] Selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics;

[0008] Based on the compression strategy, multi-thread concurrent compression is performed on each shard data, and all compressed data is uploaded; wherein all compressed data includes shard compressed data and non-shard compressed data;

[0009] All compressed data are decompressed according to the sharding strategy and the compression strategy, and the corresponding decompression results are output.

[0010] In one embodiment of the present invention, the process of installing the plug-in by using a software development tool determined in advance or in real time includes:

[0011] The configuration end of the corresponding industrial application system uses a package management tool to install the compression plug-in, and uses a packaging tool to compile and package it, or uses a script tag of a hypertext markup language to globally import it;

[0012] The server side of the corresponding industrial application system uses a project management tool to install and update the plug-in, wherein the project management tool includes a tool for managing and building programming language projects.

[0013] In one embodiment of the present invention, the process of selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy includes:

[0014] After completing the installation of the plug-in, the received industrial application configuration data is judged, and when the volume or length of the industrial application configuration data is greater than or equal to the corresponding preset threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume or length of the industrial application configuration data is less than the corresponding preset threshold, the industrial application configuration data is marked as non-extra-large configuration data;

[0015] For the very large configuration data, a sharding strategy is selected based on at least one of character length, number of array sub-elements, and volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain a plurality of shard data, and a label is sequentially assigned to each shard data;

[0016] The non-extra-large configuration data is not fragmented, and a compression algorithm with a repeated character compression ratio higher than a preset compression ratio is selected as the corresponding compression strategy.

[0017] In one embodiment of the present invention, the process of performing multi-thread concurrent compression on each shard data based on the compression strategy and storing the shard compressed data through the network request library includes:

[0018] Based on the compression strategy, each slice data is compressed using multi-threading technology, and the slice compressed data is stored in the server of the industrial application system, and the slice strategy and the compression strategy are stored in the server; wherein the slice compressed data is stored using a network request library in each concurrent thread;

[0019] The data structure of each fragment data includes: {Q1, I1, T1}, where Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text.

[0020] In one embodiment of the present invention, before decompressing all compressed data according to the sharding strategy and the compression strategy, the method further includes:

[0021] Query according to the data flag of the application configuration data;

[0022] If it is found that the data stored in the server is fragmented compressed data, all fragmented data corresponding to the data flag are queried in order, and combined with the fragmentation strategy and compression strategy stored in the server, they are assembled into the final returned data. The returned data format includes: {P1, A1, [T1, T2, T3...]}, where P1 represents the fragmentation strategy flag, which is used to characterize the fragmentation algorithm type; when P1=0, it means that the fragmentation strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent compressed texts of the same data flag;

[0023] If it is found that the data stored in the server is non-fragmented compressed data, the returned data format includes: {0, 3, T1}, where 0 indicates that the fragmentation strategy is not used, 3 indicates the compression strategy flag, and T1 indicates compressed text.

[0024] In one embodiment of the present invention, the process of decompressing all compressed data according to the sharding strategy and the compression strategy includes:

[0025] For non-fragmented compressed data, decompress and restore the data according to the compression strategy stored in the server;

[0026] For the sharded compressed data, after decompression according to the compression strategy stored in the server, concurrent assembly and restoration of the data are performed according to the sharding strategy stored in the server.

[0027] The present invention also provides an industrial application configuration data transmission system, the system comprising:

[0028] A plug-in installation module, used to install the plug-in through a software development tool determined in advance or in real time;

[0029] A sharding and compression strategy module, used to select a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and to shard the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics;

[0030] A concurrent compression and upload module, used to perform multi-threaded concurrent compression on each shard data according to the compression strategy, and upload the shard data;

[0031] The shard data organization module is used to collect and assemble the uploaded shard data;

[0032] A decompression module is provided, which is used to decompress all compressed data according to the fragmentation strategy and the compression strategy, and output corresponding decompression results; wherein all compressed data includes fragmentation compressed data and non-fragmentation compressed data.

[0033] In one embodiment of the present invention, the sharding and compression strategy module selects a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and the process of sharding the industrial application configuration data based on the sharding strategy includes:

[0034] After completing the installation of the plug-in, the received industrial application configuration data is judged, and when the volume or length of the industrial application configuration data is greater than or equal to the corresponding preset threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume or length of the industrial application configuration data is less than the corresponding preset threshold, the industrial application configuration data is marked as non-extra-large configuration data;

[0035] For the very large configuration data, a sharding strategy is selected based on at least one of character length, number of array sub-elements, and volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain a plurality of shard data, and a label is sequentially assigned to each shard data;

[0036] The non-extra-large configuration data is not fragmented, and a compression algorithm with a repeated character compression ratio higher than a preset compression ratio is selected as the corresponding compression strategy.

[0037] The present invention also provides a computer device, comprising a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of any one of the above-mentioned industrial application configuration data transmission methods.

[0038] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned industrial application configuration data transmission methods are implemented.

[0039] As described above, the present invention provides an industrial application configuration data transmission method and system, computer equipment and medium, which have the following beneficial effects: first, the plug-in is installed through a software development tool determined in advance or in real time, and then the fragmentation strategy and compression strategy are selected according to the plug-in installation result and the industrial application configuration data parameters, and the industrial application configuration data is fragmented based on the fragmentation strategy; then, each fragmented data is compressed concurrently by multiple threads based on the compression strategy, and all compressed data are uploaded; wherein all compressed data include fragmented compressed data and non-fragmented compressed data; finally, all compressed data are decompressed according to the fragmentation strategy and the compression strategy, and the corresponding decompression result is output. Among them, the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics. It can be seen from this that the present invention can realize fast and high compression ratio compression of industrial configuration data, can adapt to fragmentation and compression strategies according to the configuration data situation, can perform concurrent compression and decompression on different fragments, and reduce the bandwidth of configuration data transmission and mobile terminal access traffic overhead without affecting the original performance and process, thereby improving the application development and use experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 A schematic diagram of a flow chart of a method for configuring data transmission for industrial applications provided in an embodiment of the present invention;

[0041] Figure 2 A schematic diagram of an industrial application configuration data transmission architecture provided by an embodiment of the present invention;

[0042] Figure 3 A schematic diagram of a forward data transmission process provided by an embodiment of the present invention;

[0043] Figure 4 A schematic diagram of a reverse data transmission process provided by an embodiment of the present invention;

[0044] Figure 5 The figure is a schematic diagram of the hardware structure of a computer device suitable for implementing one or more embodiments of the present invention. DETAILED DESCRIPTION

[0045] The following is an explanation of the embodiments of the present invention by specific specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied by other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It is understood that the following embodiments and the features in the embodiments can be combined with each other without conflict. In addition, it is understood that the illustrations provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner, and only the components related to the present invention are shown in the drawings instead of being drawn according to the number, shape and size of the components during actual implementation. The type, quantity and proportion of each component during actual implementation can be a random change, and the component layout type may also be more complicated.

[0046] Figure 1 A schematic diagram of a method for transmitting data in industrial application configuration is shown. Specifically, in an exemplary embodiment, Figure 1 As shown, this embodiment provides an industrial application configuration data transmission method, comprising the following steps:

[0047] S110, installing the plug-in through a software development tool determined in advance or in real time. In this embodiment or other embodiments, the process of installing the plug-in through a software development tool determined in advance or in real time includes: the configuration end of the corresponding industrial application system uses a package management tool to install the compression plug-in, and uses a packaging tool to compile and package it, or uses a script tag of a hypertext markup language for global import. The server end of the corresponding industrial application system uses a project management tool to install and update the plug-in, wherein the project management tool includes tools for managing and building programming language projects. As an example, package management tools include but are not limited to npm, yarn, and pnpm; project management tools include but are not limited to maven. Figure 2 A schematic diagram of an industrial application configuration data transmission architecture is shown, wherein the relationship between the configuration end of the industrial application system, the service end of the industrial application system, and the operation end of the industrial application system is shown in FIG. Figure 2 shown.

[0048] S120, selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics.

[0049] S130, performing multi-thread concurrent compression on each shard data based on the compression strategy, and uploading all compressed data; wherein all compressed data includes shard compressed data and non-shard compressed data;

[0050] S140, decompress all compressed data according to the fragmentation strategy and the compression strategy, and output the corresponding decompression result.

[0051] According to the above records, in an exemplary embodiment, the process of selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy includes:

[0052] After the installation of the plug-in is completed, the received industrial application configuration data is judged, and when the volume of the industrial application configuration data is greater than or equal to the corresponding preset volume threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume of the industrial application configuration data is less than the corresponding preset volume threshold, the industrial application configuration data is marked as non-extra-large configuration data. In addition, the judgment of extra-large configuration data or non-extra-large configuration data can also be made based on the length of the industrial application configuration data. Specifically, after the installation of the plug-in is completed, the received industrial application configuration data is judged, and when the length of the industrial application configuration data is greater than or equal to the corresponding preset length threshold, the industrial application configuration data is marked as extra-large configuration data; or when the length of the industrial application configuration data is less than the corresponding preset length threshold, the industrial application configuration data is marked as non-extra-large configuration data.

[0053] For extremely large configuration data, a sharding strategy is selected based on at least one of the character length, the number of array sub-elements, and the volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain multiple shard data, and each shard data is assigned a label in sequence.

[0054] For non-extra-large configuration data, no fragmentation is performed, and a compression algorithm with a compression ratio of repeated characters higher than a preset compression ratio is selected as the corresponding compression strategy. As an example, in this embodiment or other embodiments, the compression algorithm includes but is not limited to Gzip, Brotli, Snappy and other compression algorithms.

[0055] According to the above records, in an exemplary embodiment, the process of performing multi-threaded concurrent compression on each shard data based on the compression strategy and storing the shard compressed data through the network request library includes: based on the compression strategy, using multi-threading technology to compress each shard data, and storing the shard compressed data to the server of the industrial application system, and storing the shard strategy and compression strategy to the server; wherein the network request library is used in each concurrent thread to store the shard compressed data; the data structure of each shard data includes: {Q1, I1, T1}, wherein Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text. Among them, in this embodiment or other embodiments, multi-threading technology includes but is not limited to WebWorker. Web Worker is a separate thread running in the background of the browser. This thread can perform some time-consuming operations without blocking the main thread (i.e., UI thread).

[0056] According to the above records, in an exemplary embodiment, before decompressing all compressed data according to the fragmentation strategy and the compression strategy, it can also include: querying according to the data flag of the application configuration data; if the data stored in the server is found to be fragmented compressed data, all fragmented data corresponding to the data flag are queried in order, and combined with the fragmentation strategy and compression strategy stored in the server, they are assembled into the final return data, and the return data format includes: {P1, A1, [T1, T2, T3...]}, where P1 represents the fragmentation strategy flag, which is used to characterize the fragmentation algorithm type; when P1=0, it means that the fragmentation strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent compressed texts of the same data flag. If the data stored in the server is found to be non-fragmented compressed data, the return data format includes: {0, 3, T1}, where 0 represents that the fragmentation strategy is not used, 3 represents the compression strategy flag, and T1 represents compressed text.

[0057] According to the above records, in an exemplary embodiment, the process of decompressing all compressed data according to the sharding strategy and the compression strategy includes: for non-sharded compressed data, decompressing and restoring the data according to the compression strategy stored in the server; for sharded compressed data, decompressing the data according to the compression strategy stored in the server, and then concurrently assembling and restoring the data according to the sharding strategy stored in the server.

[0058] In a specific embodiment, the implementation provides an industrial application configuration data transmission method, the architecture diagram of the method when performing industrial application data transmission is as follows: Figure 2 The method specifically comprises the following steps:

[0059] S1, based on software development tools such as yarn+webpack, maven, etc., to achieve rapid installation, reference and update of plug-ins. Specifically, in this embodiment, for the configuration end, package management tools such as npm, yarn, pnpm, etc. can be used to install the compression plug-in during the industrial application project development phase, and packaging tools such as webpack, vite, etc. can be used to compile and package, or HTML script tags can be used for global import. For the server end, maven can be used for rapid installation and update of plug-ins.

[0060] S2, select the fragmentation and compression strategy according to the configuration data volume, number of elements, element volume, and data characteristics. Specifically, in order to complete the judgment of whether it is extra-large configuration data within the compression plug-in, the received original configuration data can be judged to determine whether it is extra-large configuration data. The built-in general judgment strategies such as volume and length can be used, or a custom judgment strategy can be used to compress non-extra-large configuration data using compression algorithms such as Gzip, Brotli, and Snappy with high compression ratios for repeated characters. For extra-large configuration data, the built-in fragmentation strategy can be used, including by character length, number of array sub-elements, array sub-element volume, etc., and custom fragmentation strategies are also supported to divide the original configuration file into several pieces and assign labels to each piece in sequence.

[0061] S3, based on Web Worker, implements multi-threaded concurrent computing on the browser running side, and uses Axios to upload sharded data. Among them, Axios is a powerful and easy-to-use network request library based on Promise. It supports browsers and node.js, provides rich configuration options and interceptor functions, making asynchronous operations more concise and easy to manage. Specifically, for very large configuration files, a sharding strategy is selected and sharded, and the sharded content is concurrently compressed and saved to the server. There are multiple built-in sharding strategies, including character length, number of array sub-elements, array sub-element volume, etc., and custom sharding strategies are also supported. The original configuration file is divided into several pieces, and labels are assigned to each piece in sequence. Then, multi-threading technology is used to concurrently compress each piece and save it to the server. The data structure of each shard is as follows: {Q1, I1, T1}, where Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text. At the same time, the sharding algorithm P1 and the compression algorithm A1 are saved to the backend. Multi-threading technology includes but is not limited to Web Worker, etc.

[0062] S4, collect and assemble the sharded data and return the assembly result to the running end. When the configuration data is loaded on the running end of the industrial application, it is judged whether it is a sharded configuration. The compressed data is returned normally for the non-sharded configuration data and decompressed on the running end. The running end receives the compressed data and judges whether it is non-sharded data. It can be judged according to the data flag. The data format returned by the back end is: {P1, A1, [T1, T2, T3...]}, where P1 represents the sharding strategy flag, which is used to characterize the sharding algorithm type; when P1=0, it means that the sharding strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent the compressed text of the same data flag. If the data stored on the server is found to be non-sharded compressed data, the returned data format includes: {0, 3, T1}, where 0 means that the sharding strategy is not used, 3 represents the compression strategy flag, and T1 represents the compressed text.

[0063] S5, decompresses the received compressed data, and decides whether to enable concurrent decompression based on the sharding result, and assembles the decompressed data based on the sharding strategy and returns it to the upper-layer business side. For sharding configuration data, all sharding data must be collected before returning to the operation end. The operation end performs concurrent decompression after receiving the compressed data after sharding. The server collects the sharding data based on the unique identifier Q1 of the configuration data, assembles it into the structure of S3 in sequence and returns it to the operation end, which is restored by the operation end according to the rules.

[0064] In another exemplary embodiment, the configuration end transmits data to the service end in a forward direction, and the service end transmits data to the configuration end and the operation end in a reverse direction. Specifically, Figure 3 A schematic diagram of a process flow for forward data transmission is shown. Figure 4 FIG. 1 shows a schematic diagram of a reverse data transmission process. Figure 3 As shown, the process of forward data transmission from the configuration end to the server end includes: the industrial application configuration end loads and installs the compression plug-in, and configures the industrial application normally; after the industrial application completes the configuration, the original configuration is obtained, and the compression plug-in is called, and it is determined inside the compression plug-in whether the original configuration belongs to the extra-large configuration data content; if it is not an extra-large configuration data content, normal compression is performed, and the compressed data is stored on the server end; if it is an extra-large configuration data content, content segmentation is performed, and the segmentation strategy is adjusted according to actual conditions; and a segmentation number is generated, which can be used to identify the segmentation strategy. The segments are then compressed concurrently, and the segment content and segment number are stored on the server end. In addition, as Figure 4As shown, the process of reverse data transmission from the server to the configuration end and the operation end includes: loading the configuration data and determining whether the loaded configuration data is fragmented; if it is not fragmented data, returning the original data normally; if it is fragmented data, querying all compressed fragments according to the fragment number, and returning the value to the industrial application configuration end; and using different fragmentation strategies according to the fragment number to decompress the fragmented data and restore the data.

[0065] In summary, the present invention provides a method for transmitting industrial application configuration data. First, a plug-in is installed through a software development tool determined in advance or in real time. Then, a sharding strategy and a compression strategy are selected according to the plug-in installation result and the parameters of the industrial application configuration data, and the industrial application configuration data is sharded based on the sharding strategy; then, each shard data is compressed concurrently by multiple threads based on the compression strategy, and all compressed data are uploaded; wherein, all compressed data include sharded compressed data and non-sharded compressed data; finally, all compressed data are decompressed according to the sharding strategy and the compression strategy, and the corresponding decompression result is output. Among them, the parameters of the industrial application configuration data include at least one of volume, length, number of elements, element volume, and data characteristics. It can be seen from this that the method can realize fast and high compression ratio compression of industrial configuration data, can adapt to sharding and compression strategies according to the configuration data situation, can perform concurrent compression and decompression on different shards, and reduce the bandwidth of configuration data transmission and the mobile terminal access traffic overhead without almost affecting the original performance and process, thereby improving the application development and use experience.

[0066] In another exemplary embodiment of the present invention, the embodiment further provides an industrial application configuration data transmission system, comprising:

[0067] A plug-in installation module is used to install plug-ins through a software development tool determined in advance or in real time. In this embodiment or other embodiments, the process of installing plug-ins through a software development tool determined in advance or in real time includes: the configuration end of the corresponding industrial application system uses a package management tool to install the compressed plug-in, and uses a packaging tool to compile and package it, or uses a script tag of a hypertext markup language for global import. The server end of the corresponding industrial application system uses a project management tool to install and update the plug-in, wherein the project management tool includes tools for managing and building programming language projects. As an example, package management tools include but are not limited to npm, yarn, and pnpm; project management tools include but are not limited to maven. Figure 2 A schematic diagram of an industrial application configuration data transmission architecture is shown, wherein the relationship between the configuration end of the industrial application system, the service end of the industrial application system, and the operation end of the industrial application system is shown in FIG. Figure 2 shown.

[0068] A sharding and compression strategy module, used to select a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and to shard the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics;

[0069] Concurrent compression and upload module, used to perform multi-threaded concurrent compression on each shard data according to the compression strategy, and upload the shard data;

[0070] The shard data organization module is used to collect and assemble the uploaded shard data;

[0071] A decompression module is provided, which is used to decompress all compressed data according to the fragmentation strategy and the compression strategy, and output the corresponding decompression result; wherein all compressed data includes fragmentation compressed data and non-fragmentation compressed data.

[0072] According to the above records, in an exemplary embodiment, the fragmentation and compression strategy module selects a fragmentation strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and the process of fragmenting the industrial application configuration data based on the fragmentation strategy includes:

[0073] After the installation of the plug-in is completed, the received industrial application configuration data is judged, and when the volume of the industrial application configuration data is greater than or equal to the corresponding preset volume threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume of the industrial application configuration data is less than the corresponding preset volume threshold, the industrial application configuration data is marked as non-extra-large configuration data. In addition, the judgment of extra-large configuration data or non-extra-large configuration data can also be made based on the length of the industrial application configuration data. Specifically, after the installation of the plug-in is completed, the received industrial application configuration data is judged, and when the length of the industrial application configuration data is greater than or equal to the corresponding preset length threshold, the industrial application configuration data is marked as extra-large configuration data; or when the length of the industrial application configuration data is less than the corresponding preset length threshold, the industrial application configuration data is marked as non-extra-large configuration data.

[0074] For extremely large configuration data, a sharding strategy is selected based on at least one of the character length, the number of array sub-elements, and the volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain multiple shard data, and each shard data is assigned a label in sequence.

[0075] For non-extra-large configuration data, no fragmentation is performed, and a compression algorithm with a compression ratio of repeated characters higher than a preset compression ratio is selected as the corresponding compression strategy. As an example, in this embodiment or other embodiments, the compression algorithm includes but is not limited to Gzip, Brotli, Snappy and other compression algorithms.

[0076] According to the above records, in an exemplary embodiment, the process of performing multi-threaded concurrent compression on each shard data based on the compression strategy and storing the shard compressed data through the network request library includes: based on the compression strategy, using multi-threading technology to compress each shard data, and storing the shard compressed data to the server of the industrial application system, and storing the shard strategy and compression strategy to the server; wherein the network request library is used in each concurrent thread to store the shard compressed data; the data structure of each shard data includes: {Q1, I1, T1}, wherein Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text. Among them, in this embodiment or other embodiments, multi-threading technology includes but is not limited to WebWorker. Web Worker is a separate thread running in the background of the browser. This thread can perform some time-consuming operations without blocking the main thread (i.e., UI thread).

[0077] According to the above records, in an exemplary embodiment, before decompressing all compressed data according to the fragmentation strategy and the compression strategy, it can also include: querying according to the data flag of the application configuration data; if the data stored in the server is found to be fragmented compressed data, all fragmented data corresponding to the data flag are queried in order, and combined with the fragmentation strategy and compression strategy stored in the server, they are assembled into the final return data, and the return data format includes: {P1, A1, [T1, T2, T3...]}, where P1 represents the fragmentation strategy flag, which is used to characterize the fragmentation algorithm type; when P1=0, it means that the fragmentation strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent compressed texts of the same data flag. If the data stored in the server is found to be non-fragmented compressed data, the return data format includes: {0, 3, T1}, where 0 represents that the fragmentation strategy is not used, 3 represents the compression strategy flag, and T1 represents compressed text.

[0078] According to the above records, in an exemplary embodiment, the process of decompressing all compressed data according to the sharding strategy and the compression strategy includes: for non-sharded compressed data, decompressing and restoring the data according to the compression strategy stored in the server; for sharded compressed data, decompressing the data according to the compression strategy stored in the server, and then concurrently assembling and restoring the data according to the sharding strategy stored in the server.

[0079] In a specific embodiment, the implementation provides an industrial application configuration data transmission system, and the architecture diagram of the system when performing industrial application data transmission is as follows: Figure 2 The system can perform the following steps:

[0080] Based on software development tools such as yarn+webpack and maven, plug-ins can be quickly installed, referenced and updated. Specifically, in this embodiment, for the configuration end, package management tools such as npm, yarn, and pnpm can be used to install the compression plug-in during the industrial application project development phase, and packaging tools such as webpack and vite can be used to compile and package, or HTML script tags can be used for global import. For the server end, maven can be used to quickly install and update the plug-in.

[0081] The sharding and compression strategies are selected based on the configuration data volume, number of elements, element volume, and data characteristics. Specifically, in order to determine whether the configuration data is extra-large in the compression plug-in, the received original configuration data can be judged to determine whether it is extra-large configuration data. The built-in general judgment strategies such as volume and length can be used, or a custom judgment strategy can be used to compress non-extra-large configuration data using compression algorithms such as Gzip, Brotli, and Snappy that have high compression ratios for repeated characters. For extra-large configuration data, the built-in sharding strategy can be used, including by character length, number of array sub-elements, array sub-element volume, etc., and custom sharding strategies are also supported to divide the original configuration file into several pieces and assign labels to each piece in sequence.

[0082] Based on Web Worker, multi-threaded concurrent computing is implemented on the browser running side, and Axios is used to upload sharded data. Among them, Axios is a powerful and easy-to-use network request library based on Promise. It supports browsers and node.js, provides rich configuration options and interceptor functions, making asynchronous operations more concise and easy to manage. Specifically, for very large configuration files, a sharding strategy is selected and sharded, and the sharded content is concurrently compressed and saved to the server. There are multiple built-in sharding strategies, including character length, number of array sub-elements, array sub-element volume, etc., and custom sharding strategies are also supported. The original configuration file is divided into several pieces, and labels are assigned to each piece in sequence. Then, multi-threading technology is used to concurrently compress each piece and save it to the server. The data structure of each shard is as follows: {Q1, I1, T1}, where Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text. At the same time, the sharding algorithm P1 and the compression algorithm A1 are saved to the backend. Multi-threading technology includes but is not limited to Web Worker, etc.

[0083] The sharded data is collected and assembled and the assembly results are returned to the running end. When the configuration data is loaded on the running end of the industrial application, it is judged whether it is a sharded configuration. The compressed data is returned normally for the non-sharded configuration data and decompressed on the running end. The running end receives the compressed data and judges whether it is non-sharded data. It can be judged according to the data flag. The data format returned by the back end is: {P1, A1, [T1, T2, T3...]}, where P1 represents the sharding strategy flag, which is used to characterize the sharding algorithm type; when P1=0, it means that the sharding strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent compressed texts of the same data flag. If the data stored on the server is found to be non-sharded compressed data, the returned data format includes: {0, 3, T1}, where 0 indicates that the sharding strategy is not used, 3 represents the compression strategy flag, and T1 represents compressed text.

[0084] Decompress the received compressed data, and decide whether to enable concurrent decompression based on the sharding result, and assemble the decompressed data based on the sharding strategy and return it to the upper-layer business side. For sharding configuration data, all sharding data must be collected before returning to the operation end. The operation end performs concurrent decompression after receiving the compressed data after sharding. The server collects the sharding data based on the unique identifier Q1 of the configuration data, assembles it into the structure described above in sequence, and returns it to the operation end, which is restored by the operation end according to the rules.

[0085] In summary, the present invention provides an industrial application configuration data transmission system, which first installs the plug-in through a software development tool determined in advance or in real time, then selects a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and shards the industrial application configuration data based on the sharding strategy; then, multi-threaded concurrent compression is performed on each shard data based on the compression strategy, and all compressed data are uploaded; wherein, all compressed data include shard compressed data and non-shard compressed data; finally, all compressed data are decompressed according to the sharding strategy and the compression strategy, and the corresponding decompression results are output. Among them, the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics. It can be seen from this that the system can realize fast and high compression ratio compression of industrial configuration data, can adapt to sharding and compression strategies according to the configuration data situation, can perform concurrent compression and decompression on different shards, and reduce the bandwidth of configuration data transmission and the mobile terminal access traffic overhead without almost affecting the original performance and process, thereby improving the application development and use experience.

[0086] It can be understood that the industrial application configuration data transmission system provided in the above embodiment and the industrial application configuration data transmission method provided in the above embodiment belong to the same concept, wherein the specific manner in which the industrial application configuration data transmission method performs operations has been described in detail in the above method embodiment, and will not be repeated here. In actual applications, the industrial application configuration data transmission system provided in the above embodiment can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the industrial application configuration data transmission system into different functional modules, and then implement all or part of the functions of the corresponding functional modules through the industrial application configuration data transmission method described in the above embodiment, and this is not specifically limited here.

[0087] The embodiment of the present invention further provides a computer device, which may include a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program so that the computer device executes Figure 1 The steps of the industrial application configuration data transmission method. Figure 5 FIG. 1 is a schematic diagram showing a structure of a computer device 1000. Figure 5 As shown, the computer device 1000 includes: a processor 1010 , a memory 1020 , a power supply 1030 , a display unit 1040 , and an input unit 1060 .

[0088] The processor 1010 is the control center of the computer device 1000. It uses various interfaces and lines to connect various components, and executes various functions of the computer device 1000 by running or executing computer programs / instructions stored in the memory 1020, thereby monitoring the computer device 1000 as a whole. In the embodiment of the present invention, when the processor 1010 calls the computer program stored in the memory 1020, the following is executed: Figure 1 The steps of the industrial application configuration data transmission method. Optionally, the processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application, etc., and the modem processor mainly processes wireless communication. In some embodiments, the processor, memory, can be implemented on a single chip, and in some embodiments, they can also be implemented separately on independent chips.

[0089] The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, etc.; the data storage area may store instruction data, etc. created according to the use of the computer device 1000. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices, etc.

[0090] The computer device 1000 also includes a power source 1030 (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 1010 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0091] The display unit 1040 may be used to display information input by the user or information provided to the user and various menus of the computer device 1000, and in the embodiment of the present invention, is mainly used to display the display interface of each application in the computer device 1000 and objects such as text and pictures displayed in the display interface. The display unit 1040 may include a display panel 1050. The display panel 1050 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0092] The input unit 1060 may be used to receive information such as numbers or characters input by the user. The input unit 1060 may include a touch panel 1070 and other input devices 1080. The touch panel 1070, also known as a touch screen, may collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 1070).

[0093] Specifically, the touch panel 1070 can detect the user's touch operation, detect the signal brought by the touch operation, convert these signals into touch point coordinates, send them to the processor 1010, and receive and execute the command sent by the processor 1010. In addition, the touch panel 1070 can be implemented in various types such as resistive, capacitive, infrared and surface acoustic wave. Other input devices 1080 can include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0094] Of course, the touch panel 1070 can cover the display panel 1050. When the touch panel 1070 detects a touch operation on or near it, it is transmitted to the processor 1010 to determine the type of touch event, and then the processor 1010 provides a corresponding visual output on the display panel 1050 according to the type of touch event. Figure 5 In the embodiment, the touch panel 1070 and the display panel 1050 are two independent components to implement the input and output functions of the computer device 1000, but in some embodiments, the touch panel 1070 and the display panel 1050 can be integrated to implement the input and output functions of the computer device 1000.

[0095] The computer device 1000 may further include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the computer device 1000 may also include other components such as a camera.

[0096] The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the above-mentioned device can perform the present invention as follows: Figure 1 The steps of the industrial application configuration data transmission method.

[0097] It can be understood by those skilled in the art that Figure 5 This is only an example of a computer device and does not constitute a limitation on the device. The device may include more or fewer components than shown in the figure, or combine certain components, or different components. For the convenience of description, the above parts are divided into modules (or units) according to their functions and described separately. Of course, when implementing the present invention, the functions of each module (or unit) can be implemented in the same or multiple software or hardware.

[0098] Those skilled in the art should understand that the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be applied to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in 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.

[0099] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.

Claims

1. A method for transmitting industrial application configuration data, characterized in that: The method comprises the following steps: Plug-in installation via software development tools determined in advance or on the fly; Selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics; Based on the compression strategy, multi-thread concurrent compression is performed on each shard data, and all compressed data is uploaded; wherein all compressed data includes shard compressed data and non-shard compressed data; All compressed data are decompressed according to the sharding strategy and the compression strategy, and the corresponding decompression results are output.

2. The industrial application configuration data transmission method according to claim 1, characterized in that: The process of installing a plug-in through a pre-determined or real-time software development tool includes: The configuration end of the corresponding industrial application system uses a package management tool to install the compression plug-in, and uses a packaging tool to compile and package it, or uses a script tag of a hypertext markup language to globally import it; The server side of the corresponding industrial application system uses a project management tool to install and update the plug-in, wherein the project management tool includes a tool for managing and building programming language projects.

3. The industrial application configuration data transmission method according to claim 1, characterized in that: The process of selecting a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and sharding the industrial application configuration data based on the sharding strategy includes: After completing the installation of the plug-in, the received industrial application configuration data is judged, and when the volume or length of the industrial application configuration data is greater than or equal to the corresponding preset threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume or length of the industrial application configuration data is less than the corresponding preset threshold, the industrial application configuration data is marked as non-extra-large configuration data; For the very large configuration data, a sharding strategy is selected based on at least one of character length, number of array sub-elements, and volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain a plurality of shard data, and a label is sequentially assigned to each shard data; The non-extra-large configuration data is not fragmented, and a compression algorithm with a repeated character compression ratio higher than a preset compression ratio is selected as the corresponding compression strategy.

4. The industrial application configuration data transmission method according to claim 1 or 3, characterized in that: The process of performing multi-thread concurrent compression on each shard data based on the compression strategy and storing the shard compressed data through the network request library includes: Based on the compression strategy, each slice data is compressed using multi-threading technology, and the slice compressed data is stored in the server of the industrial application system, and the slice strategy and the compression strategy are stored in the server; wherein the slice compressed data is stored using a network request library in each concurrent thread; The data structure of each fragment data includes: {Q1, I1, T1}, where Q1 represents the data flag, I1 represents the label, and T1 represents the compressed text.

5. The industrial application configuration data transmission method according to claim 4, characterized in that: Before decompressing all compressed data according to the sharding strategy and the compression strategy, the method further includes: Query according to the data flag of the application configuration data; If it is found that the data stored in the server is fragmented compressed data, all fragmented data corresponding to the data flag are queried in order, and combined with the fragmentation strategy and compression strategy stored in the server, they are assembled into the final returned data. The returned data format includes: {P1, A1, [T1, T2, T3...]}, where P1 represents the fragmentation strategy flag, which is used to characterize the fragmentation algorithm type; when P1=0, it means that the fragmentation strategy is not used; A1 represents the compression strategy flag, which is used to characterize the compression algorithm type; T1, T2 and T3 represent compressed texts of the same data flag; If it is found that the data stored in the server is non-fragmented compressed data, the returned data format includes: {0, 3, T1}, where 0 indicates that the fragmentation strategy is not used, 3 indicates the compression strategy flag, and T1 indicates compressed text.

6. The industrial application configuration data transmission method according to claim 1 or 5, characterized in that: The process of decompressing all compressed data according to the sharding strategy and the compression strategy includes: For non-fragmented compressed data, decompress and restore the data according to the compression strategy stored in the server; For the fragmented compressed data, after decompression according to the compression strategy stored in the server, concurrent assembly and restoration of the data are performed according to the fragmentation strategy stored in the server.

7. An industrial application configuration data transmission system, characterized in that: The system comprises: A plug-in installation module, used for installing plug-ins through software development tools determined in advance or in real time; A sharding and compression strategy module, used to select a sharding strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and to shard the industrial application configuration data based on the sharding strategy; wherein the industrial application configuration data parameters include at least one of volume, length, number of elements, element volume, and data characteristics; A concurrent compression and upload module, used to perform multi-threaded concurrent compression on each shard data according to the compression strategy, and upload the shard data; The shard data organization module is used to collect and assemble the uploaded shard data; A decompression module is provided, which is used to decompress all compressed data according to the fragmentation strategy and the compression strategy, and output corresponding decompression results; wherein all compressed data includes fragmentation compressed data and non-fragmentation compressed data.

8. The industrial application configuration data transmission system according to claim 7, characterized in that: The slicing and compression strategy module selects a slicing strategy and a compression strategy according to the plug-in installation result and the industrial application configuration data parameters, and the process of slicing the industrial application configuration data based on the slicing strategy includes: After completing the installation of the plug-in, the received industrial application configuration data is judged, and when the volume or length of the industrial application configuration data is greater than or equal to the corresponding preset threshold, the industrial application configuration data is marked as extra-large configuration data; or when the volume or length of the industrial application configuration data is less than the corresponding preset threshold, the industrial application configuration data is marked as non-extra-large configuration data; For the very large configuration data, a sharding strategy is selected based on at least one of character length, number of array sub-elements, and volume of array sub-elements, or a pre- or real-time customized sharding strategy is used to shard the industrial application configuration data to obtain a plurality of shard data, and a label is sequentially assigned to each shard data; The non-extra-large configuration data is not fragmented, and a compression algorithm with a repeated character compression ratio higher than a preset compression ratio is selected as the corresponding compression strategy.

9. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the industrial application configuration data transmission method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the industrial application configuration data transmission method described in any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Data transmission method, device, equipment, medium and product

    CN121284123A