CN114938293B - NGINX data tracing method, device, equipment and storage medium based on block chain - Google Patents

NGINX data tracing method, device, equipment and storage medium based on block chain Download PDF

Info

Publication number
CN114938293B
CN114938293B CN202210461883.0A CN202210461883A CN114938293B CN 114938293 B CN114938293 B CN 114938293B CN 202210461883 A CN202210461883 A CN 202210461883A CN 114938293 B CN114938293 B CN 114938293B
Authority
CN
China
Prior art keywords
data
request
tracing
uplink
response
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210461883.0A
Other languages
Chinese (zh)
Other versions
CN114938293A (en
Inventor
白云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yunchuang Shuan Technology Co ltd
Original Assignee
Shenzhen Yunchuang Shuan Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yunchuang Shuan Technology Co ltd filed Critical Shenzhen Yunchuang Shuan Technology Co ltd
Priority to CN202210461883.0A priority Critical patent/CN114938293B/en
Publication of CN114938293A publication Critical patent/CN114938293A/en
Application granted granted Critical
Publication of CN114938293B publication Critical patent/CN114938293B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention relates to an artificial intelligence technology, and discloses a blockchain-based NGINX data tracing method, which comprises the following steps: initializing a general component and an uplink tracing component of an NGINX gateway, and acquiring request data; calculating a request abstract of the request data, and transmitting the request abstract into a message queue; forwarding the request data to an application system to obtain response data; forwarding the response data to the NGINX gateway for response, and uploading the response data to a message queue; performing data type analysis on the request abstract and the response data, and determining the data package size; packaging the request abstract and the response data into uplink data, and transmitting the uplink data into a preset block chain; and tracing and inquiring the uplink data. In addition, the invention also relates to a blockchain technology, and request abstract and response data can be stored in nodes of the blockchain. The invention also provides a NGINX data tracing device, equipment and a storage medium based on the block chain. The invention can improve the efficiency of the gateway data tracing.

Description

NGINX data tracing method, device, equipment and storage medium based on block chain
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to a method, a device, equipment and a storage medium for tracing NGINX data based on a blockchain.
Background
With the continuous development of internet technology, the volume of data is also explosively increased, in order to obtain useful information through data, the data needs to be processed, and in the process of processing, the source and the reliability of the existing data need to be accurately judged through a data tracing technology so as to ensure the authenticity of the data.
The existing data tracing technology is mainly based on simple data tracing of block chain, in practical application, in order to achieve the purposes of data tamper resistance and data tracing, the steps of signing, chaining and the like are generally carried out through a system interface of an application program integrated third party, so that data tracing is carried out, the system interface of the third party is possibly mismatched, the application range is small, the speed of data chaining and packaging is low, and therefore the efficiency of carrying out data tracing on a gateway is low.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for tracing NGINX data based on a blockchain, which mainly aim to solve the problem of low efficiency when tracing data to a gateway.
In order to achieve the above object, the invention provides a method for tracing NGINX data based on blockchain, comprising:
initializing a general component and a uplink tracing component of an NGINX gateway, and acquiring request data through the general component;
calculating a request abstract of the request data through the uplink tracing component, and transmitting the request abstract into a preset message queue;
forwarding the request data to an application system to obtain response data of the application system to the request data;
forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
performing data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to an analysis result;
packaging the request abstract and the response data according to the data packaging size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and tracing and inquiring the uplink data in the blockchain through a preset data management platform.
Optionally, said calculating a matching value between said product representation and each of said user representations comprises:
the uplink tracing component invokes a preset filling method to fill the request data to generate filling data;
calling a preset expansion method through the uplink tracing component to expand the filling data to generate expansion data, and splitting the expansion data into preset constant data groups;
and calling a preset compression function through the uplink tracing component to iteratively compress the data sets into compressed data sets one by one, and splicing the compressed data sets into a request abstract.
Optionally, the step of transmitting the request summary into a preset message queue includes:
determining transmission buffer data of the request abstract in unit transmission batches according to the preset batch transmission number and the maximum buffer number in the message queue;
and transmitting the transmission buffer data to the message queue batch by batch according to the preset asynchronous buffer time.
Optionally, the responding, with the generic component, to the request data according to the response data includes:
analyzing a response address, form data and an event method from the response data through the universal component;
responding to the request data of the response address through the event method and the form data.
Optionally, the step of performing data type analysis on the request summary and the response data in the message queue by the uplink tracing component, and determining a data package size according to an analysis result includes:
invoking a preset decoder through the uplink tracing component to respectively perform type decoding on the request abstract and the response data to obtain a request type sequence of the request abstract and a response type sequence of the response data, and merging the request type sequence and the response type sequence into a data type sequence;
and processing the data type sequence through a preset packing rule instruction to obtain a packing size mapping sequence.
Optionally, the packaging the request digest and the response data according to the data package size to obtain uplink data, and transmitting the uplink data into a preset blockchain, including:
serializing the request abstract and the response data through a preset serialization tool to obtain a primary uplink sequence;
carrying out hash signature on the primary uplink sequence through a preset signature tool to obtain a secondary uplink sequence;
packaging the secondary uplink sequence according to the packaging size mapping sequence to obtain uplink data;
and selecting one node from the block chain as a target node, transmitting the uplink data into the target node, and broadcasting to other nodes except the target node in the block chain to obtain a consensus block.
Optionally, the tracing query for the uplink data in the blockchain through a preset data management platform includes:
acquiring target traceability data through the data management platform;
inquiring the consensus block of the block chain according to the target tracing data to obtain tracing information of the target tracing data;
and displaying the traceability information on the data management platform to finish traceability inquiry.
In order to solve the above problems, the present invention further provides a NGINX data tracing device based on a blockchain, the device includes:
the device comprises a component initialization module, a request data acquisition module and a request data acquisition module, wherein the component initialization module is used for initializing a universal component and a uplink tracing component of an NGINX gateway and acquiring request data through the universal component;
the abstract calculation module is used for calculating a request abstract of the request data through the uplink tracing component and transmitting the request abstract into a preset message queue;
the request forwarding module is used for forwarding the request data to an application system to obtain response data of the application system to the request data;
the request response module is used for forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
the type analysis module is used for carrying out data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to the analysis result;
the packing and uplink module is used for packing the request abstract and the response data according to the data packing size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and the traceability query module is used for carrying out traceability query on the uplink data in the block chain through a preset data management platform.
In order to solve the above problems, the present invention also provides an apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the blockchain-based NGINX data tracing method described above.
In order to solve the above-mentioned problems, the present invention further provides a storage medium, where at least one computer program is stored, where the at least one computer program is executed by a processor in a device to implement the above-mentioned NGINX data tracing method based on a blockchain.
According to the embodiment of the invention, the NGINX gateway is selected, so that the gateway deployment efficiency can be improved, the application range of gateway data tracing can be enlarged, the data information transmission safety can be ensured by calculating the request abstract, the request data and the response data can be connected in series by the unique number, the subsequent data tracing is convenient, meanwhile, the request abstract is transmitted into the message queue through asynchronous transmission, the loss of the data transmission on the gateway performance can be effectively reduced, the response time is reduced, and the data tracing efficiency is improved; the data type analysis is carried out on the request abstract and the response data in the message queue through the uplink tracing component, and the data packing size is determined according to the analysis result, so that different packing sizes can be selected for data of different data types, the data packing time can be effectively reduced, and the data tracing efficiency is further improved. Therefore, the method, the device, the equipment and the storage medium for tracing the NGINX data based on the blockchain can solve the problem of low efficiency when tracing the data to the gateway.
Drawings
FIG. 1 is a flowchart of a blockchain-based NGINX data tracing method according to an embodiment of the present invention;
FIG. 2 is a flowchart of a summary calculation request according to an embodiment of the present invention;
fig. 3 is a schematic flow chart of a packing uplink according to an embodiment of the present invention;
FIG. 4 is a functional block diagram of a blockchain-based NGINX data trace-source device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a device for implementing the NGINX data tracing method based on blockchain according to an embodiment of the present invention.
The achievement of the objects, functional features and advantages of the present invention will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
The embodiment of the application provides a block chain-based NGINX data tracing method. The execution subject of the NGINX data tracing method based on the blockchain includes, but is not limited to, at least one of a server, a terminal, and the like, which can be configured to execute the method provided by the embodiment of the present application. In other words, the NGINX data tracing method based on the blockchain may be executed by software or hardware installed in a terminal device or a server device, where the software may be a blockchain platform. The service end includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (ContentDelivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.
Referring to fig. 1, a flow chart of a block chain-based NGINX data tracing method according to an embodiment of the present invention is shown. In this embodiment, the NGINX data tracing method based on the blockchain includes:
s1, initializing a general component and a uplink tracing component of an NGINX gateway, and acquiring request data through the general component;
in the embodiment of the invention, the NGINX gateway is a high-performance hypertext transfer protocol and reverse proxy server, and is also a gateway with simple installation, concise configuration file and less errors.
In detail, the general components include a rule component, a rule configuration component, and a base function component.
In particular, the uplink tracing component may be an integrated module of a gateway and a blockchain.
In the embodiment of the invention, the NGINX gateway has good support to the old platform, and the efficiency of gateway deployment can be improved by selecting the NGINX gateway, so that the application range of gateway data tracing is enlarged.
S2, calculating a request abstract of the request data through the uplink tracing component, and transmitting the request abstract into a preset message queue;
in the embodiment of the invention, the message queue can be Kafka, kafka is an open source stream processing platform written by Scala and Java, kafka is a high-throughput distributed publish-subscribe message system, and the system can process all action stream data of consumers in websites.
In the embodiment of the present invention, referring to fig. 2, the step of calculating, by the uplink tracing component, a request digest of the request data includes steps S21 to S23:
s21, calling a preset filling method through the uplink tracing component to fill the request data to generate filling data;
s22, calling a preset expansion method through the uplink tracing component to expand the filling data to generate expansion data, and splitting the expansion data into preset constant data groups;
s23, calling a preset compression function through the uplink tracing component to iteratively compress the data sets into compressed data sets one by one, and splicing the compressed data sets into a request abstract.
In detail, the fill method may be a fill () method.
Specifically, the extension method may be an msgExten () method.
Specifically, the preset constant may be 16.
In detail, the compression function may be an Iter () function.
Specifically, the step of transmitting the request abstract into a preset message queue includes: determining transmission buffer data of the request abstract in unit transmission batches according to the preset batch transmission number and the maximum buffer number in the message queue; and transmitting the transmission buffer data to the message queue batch by batch according to the preset asynchronous buffer time.
In the embodiment of the invention, the data information transmission safety can be ensured by calculating the request abstract, the request data and the response data can be connected in series by the unique number, the subsequent data tracing is convenient, meanwhile, the request abstract is transmitted into the message queue by asynchronous transmission, the loss of the data transmission to the gateway performance can be effectively reduced, the response time is reduced, and the data tracing efficiency is improved.
S3, forwarding the request data to an application system to obtain response data of the application system to the request data;
in an embodiment of the present invention, the forwarding the request data to an application system includes: and forwarding the request data to a preset cache database, and forwarding the request data to an application system through the cache database.
In detail, the cache database may be Redis, redis (Remote Dictionary Server), i.e. remote dictionary service, which is an open-source support network, may be based on a memory, may also be persistent, and provides interfaces for multiple languages.
In the embodiment of the invention, the request data is forwarded to the cache database, so that the transmission pressure of the gateway can be reduced and the performance loss of the gateway can be reduced by taking the cache database as a data transmission medium, thereby improving the efficiency of data tracing.
S4, forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
in the embodiment of the present invention, the method for forwarding the response data to the NGINX gateway is consistent with the method for forwarding the request data to the application system in step S3.
In an embodiment of the present invention, the responding, by the generic component, the request data according to the response data includes: analyzing a response address, form data and an event method from the response data through the universal component; responding to the request data of the response address through the event method and the form data.
In the embodiment of the present invention, the method for uploading the response data to the message queue is consistent with the method for transferring the request abstract to the preset message queue in step S2.
S5, carrying out data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to an analysis result;
in the embodiment of the present invention, the data type analysis is performed on the request abstract and the response data in the message queue by the uplink tracing component, and the data package size is determined according to the analysis result, including: invoking a preset decoder through the uplink tracing component to respectively perform type decoding on the request abstract and the response data to obtain a request type sequence of the request abstract and a response type sequence of the response data, and merging the request type sequence and the response type sequence into a data type sequence; and processing the data type sequence through a preset packing rule instruction to obtain a packing size mapping sequence.
In detail, the decoder may be a Content-Type decoder, and Content-Type is a header field in HTTP protocol, which is used to represent a file Type of transmission data, such as text, picture, video, etc., for example, content-Type: text/html; charset=utf-8 indicates a UTF8 encoded HTML format file.
Specifically, the packing rule instruction may refer to a LUA instruction that matches a data type and a packing size with each other; for example, for text type data, the package size is 10kb per package, and for image type data, the package size is 100kb per package; the packing rule instruction can be input by a user or obtained by the uplink tracing component through historical packing data learning.
Specifically, the packed size mapping sequence refers to a sequence of packed sizes mapped one by one with the request digest and the response data.
In the embodiment of the invention, the uplink tracing component analyzes the data types of the request abstract and the response data in the message queue, and determines the data packing size according to the analysis result, so that different packing sizes can be selected for the data of different data types, the data packing time can be effectively reduced, and the data tracing efficiency is further improved.
S6, packaging the request abstract and the response data according to the data packaging size to obtain uplink data, and transmitting the uplink data into a preset block chain;
in the embodiment of the present invention, referring to fig. 3, the step of packaging the request digest and the response data according to the data package size to obtain uplink data, and transmitting the uplink data into a preset blockchain includes steps S31-S34:
s31, serializing the request abstract and the response data through a preset serialization tool to obtain a primary uplink sequence;
s32, carrying out hash signature on the primary uplink sequence through a preset signature tool to obtain a secondary uplink sequence;
s33, packaging the secondary uplink sequence according to the packaging size mapping sequence to obtain uplink data;
s34, selecting a node from the block chain as a target node, transmitting the uplink data into the target node, and broadcasting to other nodes except the target node in the block chain to obtain a consensus block.
In detail, the serialization tool may be a Json serialization tool, including but not limited to Json-lib, fastJson, jackson, gson.
In the embodiment of the invention, the blockchain may be an open source coalition chain.
In detail, the consensus block includes a timestamp and a modification record of the uplink data.
In the embodiment of the invention, the request abstract and the response data are serialized, so that the data can be conveniently packaged according to types, meanwhile, the data can be effectively prevented from being tampered, the identity and the information of a sender can be bound by carrying out hash signature on primary uplink data, a basis is provided for subsequent data tracing, other people are prevented from impersonating the sender, the data is prevented from being tampered, and the safety and the uniqueness of the data can be ensured by broadcasting other nodes except for the target node.
S7, tracing and inquiring the uplink data in the block chain through a preset data management platform.
In the embodiment of the present invention, the tracing inquiry of the uplink data in the blockchain through the preset data management platform includes: acquiring target traceability data through the data management platform; inquiring the consensus block of the block chain according to the target tracing data to obtain tracing information of the target tracing data; and displaying the traceability information on the data management platform to finish traceability inquiry.
In the embodiment of the present invention, the target trace data may be a unique number or a hash digest corresponding to the uplink data.
In detail, the trace information includes a modification record, sender information, a time stamp, and the like.
According to the embodiment of the invention, the data tracing can be conveniently carried out by the user through the data management platform, and the tracing information is fully displayed, so that the interactive experience of the user is improved.
According to the embodiment of the invention, the NGINX gateway is selected, so that the gateway deployment efficiency can be improved, the application range of gateway data tracing can be enlarged, the data information transmission safety can be ensured by calculating the request abstract, the request data and the response data can be connected in series by the unique number, the subsequent data tracing is convenient, meanwhile, the request abstract is transmitted into the message queue through asynchronous transmission, the loss of the data transmission on the gateway performance can be effectively reduced, the response time is reduced, and the data tracing efficiency is improved; the data type analysis is carried out on the request abstract and the response data in the message queue through the uplink tracing component, and the data packing size is determined according to the analysis result, so that different packing sizes can be selected for data of different data types, the data packing time can be effectively reduced, and the data tracing efficiency is further improved. Therefore, the NGINX data tracing method based on the block chain can solve the problem of low efficiency when the gateway is traced with data.
Fig. 4 is a functional block diagram of a block-chain-based NGINX data tracing device according to an embodiment of the present invention.
The NGINX data tracing device 100 based on the blockchain in the present invention may be installed in a device. Depending on the implementation function, the NGINX data tracing apparatus 100 based on the blockchain may include a component initializing module 101, a summary calculating module 102, a request forwarding module 103, a request responding module 104, a type analyzing module 105, a packaging and uplink module 106, and a tracing and querying module 107. The module of the invention, which may also be referred to as a unit, refers to a series of computer program segments, which are stored in the memory of the device, capable of being executed by the processor of the device and of performing a fixed function.
In the present embodiment, the functions concerning the respective modules/units are as follows:
the component initializing module 101 is configured to initialize a generic component and a uplink tracing component of an NGINX gateway, and obtain request data through the generic component;
the digest calculation module 102 is configured to calculate, by using the uplink tracing component, a request digest of the request data, and transfer the request digest into a preset message queue;
the request forwarding module 103 is configured to forward the request data to an application system, so as to obtain response data of the application system to the request data;
the request response module 104 is configured to forward the response data to the NGINX gateway, respond to the request data according to the response data by using the generic component, and upload the response data to the message queue;
the type analysis module 105 is configured to perform data type analysis on the request summary and the response data in the message queue through the uplink tracing component, and determine a data package size according to an analysis result;
the packaging uplink module 106 is configured to package the request summary and the response data according to the data package size, obtain uplink data, and transmit the uplink data into a preset blockchain;
the traceability query module 107 is configured to perform traceability query on uplink data in the blockchain through a preset data management platform.
In detail, each module in the NGINX data tracing device 100 based on the blockchain in the embodiment of the present invention adopts the same technical means as the NGINX data tracing method based on the blockchain in fig. 1 to 3, and can generate the same technical effects, which is not described herein.
Fig. 5 is a schematic structural diagram of an apparatus for implementing a blocking-chain-based NGINX data tracing method according to an embodiment of the present invention.
The device 1 may comprise a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further comprise a computer program stored in the memory 11 and executable on the processor 10, such as a blockchain based NGINX data trace-source program.
The processor 10 may be formed by an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed by a plurality of integrated circuits packaged with the same function or different functions, including one or more central processing units (Central Processing unit, CPU), a microprocessor, a digital processing chip, a graphics processor, a combination of various control chips, and so on. The processor 10 is a Control Unit (Control Unit) of the device, connects various components of the entire device using various interfaces and lines, and performs various functions of the device and processes data by running or executing programs or modules stored in the memory 11 (e.g., executing a blockchain-based NGINX data trace-out program, etc.), and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, a removable hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the device, such as a removable hard disk of the device. The memory 11 may in other embodiments also be an external storage device of the device, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the device. The memory 11 may be used not only to store application software installed in a device and various types of data, such as code of a NGINX data traceability program based on a blockchain, but also to temporarily store data that has been output or is to be output.
The communication bus 12 may be a peripheral component interconnect standard (peripheral component interconnect, PCI) bus, or an extended industry standard architecture (extended industry standard architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. The bus is arranged to enable a connection communication between the memory 11 and at least one processor 10 etc.
The communication interface 13 is used for communication between the above-mentioned devices and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), typically used to establish a communication connection between the device and other devices. The user interface may be a Display (Display), an input unit such as a Keyboard (Keyboard), or alternatively a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, or the like. The display may also be referred to as a display screen or display unit, as appropriate, for displaying information processed in the device and for displaying a visual user interface.
Only devices having components are shown, and it will be understood by those skilled in the art that the structures shown in the figures are not limiting of the devices and may include fewer or more components than shown, or some combination of components, or a different arrangement of components.
For example, although not shown, the apparatus may further include a power source (such as a battery) for supplying power to the respective components, and preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that functions of charge management, discharge management, power consumption management, etc. are implemented through the power management device. The power supply may also include one or more of any of a direct current or alternating current power supply, recharging device, power failure detection circuit, power converter or inverter, power status indicator, etc. The device may also include various sensors, bluetooth modules, wi-Fi modules, etc., which are not described in detail herein.
It should be understood that the embodiments described are for illustrative purposes only and are not limited to this configuration in the scope of the patent application.
The memory 11 in the device 1 stores a blockchain-based NGINX data trace program that is a combination of instructions that, when executed in the processor 10, implement:
initializing a general component and a uplink tracing component of an NGINX gateway, and acquiring request data through the general component;
calculating a request abstract of the request data through the uplink tracing component, and transmitting the request abstract into a preset message queue;
forwarding the request data to an application system to obtain response data of the application system to the request data;
forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
performing data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to an analysis result;
packaging the request abstract and the response data according to the data packaging size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and tracing and inquiring the uplink data in the blockchain through a preset data management platform.
In particular, the specific implementation method of the above instructions by the processor 10 may refer to the description of the relevant steps in the corresponding embodiment of the drawings, which is not repeated herein.
Further, the modules/units integrated in the device 1 may be stored in a storage medium if implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or nonvolatile. For example, the storage medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM).
The present invention also provides a storage medium storing a computer program which, when executed by a processor of a device, can implement:
initializing a general component and a uplink tracing component of an NGINX gateway, and acquiring request data through the general component;
calculating a request abstract of the request data through the uplink tracing component, and transmitting the request abstract into a preset message queue;
forwarding the request data to an application system to obtain response data of the application system to the request data;
forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
performing data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to an analysis result;
packaging the request abstract and the response data according to the data packaging size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and tracing and inquiring the uplink data in the blockchain through a preset data management platform.
In the several embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be other manners of division when actually implemented.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units can be realized in a form of hardware or a form of hardware and a form of software functional modules.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof.
The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
The embodiment of the application can acquire and process the related data based on the artificial intelligence technology. Among these, artificial intelligence (Artificial Intelligence, AI) is the theory, method, technique and application system that uses a digital computer or a digital computer-controlled machine to simulate, extend and extend human intelligence, sense the environment, acquire knowledge and use knowledge to obtain optimal results.
Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units or means recited in the system claims can also be implemented by means of software or hardware by means of one unit or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the present invention and not for limiting the same, and although the present invention has been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications and equivalents may be made to the technical solution of the present invention without departing from the spirit and scope of the technical solution of the present invention.

Claims (10)

1. A blockchain-based NGINX data tracing method, the method comprising:
initializing a general component and a uplink tracing component of an NGINX gateway, and acquiring request data through the general component;
calculating a request abstract of the request data through the uplink tracing component, and transmitting the request abstract into a preset message queue;
forwarding the request data to an application system to obtain response data of the application system to the request data;
forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
performing data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to an analysis result;
packaging the request abstract and the response data according to the data packaging size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and tracing and inquiring the uplink data in the blockchain through a preset data management platform.
2. The method for block chain based NGINX data tracing of claim 1, wherein said calculating, by said uplink tracing component, a request digest of said request data comprises:
the uplink tracing component invokes a preset filling method to fill the request data to generate filling data;
calling a preset expansion method through the uplink tracing component to expand the filling data to generate expansion data, and splitting the expansion data into preset constant data groups;
and calling a preset compression function through the uplink tracing component to iteratively compress the data sets into compressed data sets one by one, and splicing the compressed data sets into a request abstract.
3. The method for tracing the NGINX data based on the blockchain as in claim 1, wherein said transferring the request digest into a predetermined message queue comprises:
determining transmission buffer data of the request abstract in unit transmission batches according to the preset batch transmission number and the maximum buffer number in the message queue;
and transmitting the transmission buffer data to the message queue batch by batch according to the preset asynchronous buffer time.
4. The method for blocking-chain based NGINX data tracing of claim 1, wherein said responding to said request data with said generic component according to said response data comprises:
analyzing a response address, form data and an event method from the response data through the universal component;
responding to the request data of the response address through the event method and the form data.
5. The method for tracing the NGINX data based on the blockchain as in claim 1, wherein the step of performing data type analysis on the request summary and the response data in the message queue by the uplink tracing component and determining the data package size according to the analysis result comprises:
invoking a preset decoder through the uplink tracing component to respectively perform type decoding on the request abstract and the response data to obtain a request type sequence of the request abstract and a response type sequence of the response data, and merging the request type sequence and the response type sequence into a data type sequence;
and processing the data type sequence through a preset packing rule instruction to obtain a packing size mapping sequence.
6. The method for tracing the NGINX data based on the blockchain as in claim 1, wherein said packing the request digest and the response data according to the data packing size to obtain the uplink data, and transmitting the uplink data into the preset blockchain, comprises:
serializing the request abstract and the response data through a preset serialization tool to obtain a primary uplink sequence;
carrying out hash signature on the primary uplink sequence through a preset signature tool to obtain a secondary uplink sequence;
packaging the secondary uplink sequence according to the packaging size mapping sequence to obtain uplink data;
and selecting one node from the block chain as a target node, transmitting the uplink data into the target node, and broadcasting to other nodes except the target node in the block chain to obtain a consensus block.
7. The method for tracing the data of the NGINX based on the blockchain according to any one of claims 1 to 6, wherein the tracing the uplink data in the blockchain by the preset data management platform includes:
acquiring target traceability data through the data management platform;
inquiring the consensus block of the block chain according to the target tracing data to obtain tracing information of the target tracing data;
and displaying the traceability information on the data management platform to finish traceability inquiry.
8. A blockchain-based NGINX data trace-source device, the device comprising:
the device comprises a component initialization module, a request data acquisition module and a request data acquisition module, wherein the component initialization module is used for initializing a universal component and a uplink tracing component of an NGINX gateway and acquiring request data through the universal component;
the abstract calculation module is used for calculating a request abstract of the request data through the uplink tracing component and transmitting the request abstract into a preset message queue;
the request forwarding module is used for forwarding the request data to an application system to obtain response data of the application system to the request data;
the request response module is used for forwarding the response data to the NGINX gateway, responding the request data by utilizing the general component according to the response data, and uploading the response data to the message queue;
the type analysis module is used for carrying out data type analysis on the request abstract and the response data in the message queue through the uplink tracing component, and determining the data packing size according to the analysis result;
the packing and uplink module is used for packing the request abstract and the response data according to the data packing size to obtain uplink data, and transmitting the uplink data into a preset block chain;
and the traceability query module is used for carrying out traceability query on the uplink data in the block chain through a preset data management platform.
9. An apparatus, the apparatus comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the blockchain-based NGINX data tracing method of any of claims 1 to 7.
10. A storage medium storing a computer program, wherein the computer program when executed by a processor implements a blockchain-based NGINX data tracing method according to any one of claims 1 to 7.
CN202210461883.0A 2022-04-28 2022-04-28 NGINX data tracing method, device, equipment and storage medium based on block chain Active CN114938293B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210461883.0A CN114938293B (en) 2022-04-28 2022-04-28 NGINX data tracing method, device, equipment and storage medium based on block chain

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210461883.0A CN114938293B (en) 2022-04-28 2022-04-28 NGINX data tracing method, device, equipment and storage medium based on block chain

Publications (2)

Publication Number Publication Date
CN114938293A CN114938293A (en) 2022-08-23
CN114938293B true CN114938293B (en) 2024-03-12

Family

ID=82862649

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210461883.0A Active CN114938293B (en) 2022-04-28 2022-04-28 NGINX data tracing method, device, equipment and storage medium based on block chain

Country Status (1)

Country Link
CN (1) CN114938293B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019100991A1 (en) * 2017-11-27 2019-05-31 北京京东金融科技控股有限公司 Information processing method, device and system, storage medium, and electronic device
CN110011793A (en) * 2019-04-03 2019-07-12 上海中商网络股份有限公司 Anti-fake data processing method of tracing to the source, device, equipment and medium
CN111475530A (en) * 2020-04-08 2020-07-31 珠海复旦创新研究院 Traceability information verification query method, device and equipment based on block chain
CN111523888A (en) * 2020-04-16 2020-08-11 武汉有牛科技有限公司 On-chain data and information traceability system based on block chain technology
CN111552676A (en) * 2020-04-26 2020-08-18 北京众享比特科技有限公司 Block chain based evidence storing method, device, equipment and medium
CN111681015A (en) * 2020-06-10 2020-09-18 复旦大学 Product tracing method, system and equipment based on alliance chain
CN112200690A (en) * 2020-10-27 2021-01-08 西安纸贵互联网科技有限公司 Ship quality traceability system based on block chain
CN112734448A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Agricultural product tracing method, system, equipment and storage medium based on block chain
CN113127307A (en) * 2021-04-25 2021-07-16 北京大米科技有限公司 Method for processing tracing request, related device, system and storage medium
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device
WO2022061599A1 (en) * 2020-09-23 2022-03-31 中国科学院深圳先进技术研究院 Blockchain-based distributed internet of things instruction management method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110727712B (en) * 2019-10-15 2021-06-04 腾讯科技(深圳)有限公司 Data processing method and device based on block chain network, electronic equipment and storage medium
CN111967062A (en) * 2020-08-21 2020-11-20 支付宝(杭州)信息技术有限公司 Data processing system, method and device based on block chain

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019100991A1 (en) * 2017-11-27 2019-05-31 北京京东金融科技控股有限公司 Information processing method, device and system, storage medium, and electronic device
CN110011793A (en) * 2019-04-03 2019-07-12 上海中商网络股份有限公司 Anti-fake data processing method of tracing to the source, device, equipment and medium
CN111475530A (en) * 2020-04-08 2020-07-31 珠海复旦创新研究院 Traceability information verification query method, device and equipment based on block chain
CN111523888A (en) * 2020-04-16 2020-08-11 武汉有牛科技有限公司 On-chain data and information traceability system based on block chain technology
CN111552676A (en) * 2020-04-26 2020-08-18 北京众享比特科技有限公司 Block chain based evidence storing method, device, equipment and medium
CN111681015A (en) * 2020-06-10 2020-09-18 复旦大学 Product tracing method, system and equipment based on alliance chain
WO2022061599A1 (en) * 2020-09-23 2022-03-31 中国科学院深圳先进技术研究院 Blockchain-based distributed internet of things instruction management method and system
CN112200690A (en) * 2020-10-27 2021-01-08 西安纸贵互联网科技有限公司 Ship quality traceability system based on block chain
CN112734448A (en) * 2021-01-12 2021-04-30 成都库珀区块链科技有限公司 Agricultural product tracing method, system, equipment and storage medium based on block chain
CN113127307A (en) * 2021-04-25 2021-07-16 北京大米科技有限公司 Method for processing tracing request, related device, system and storage medium
CN113726525A (en) * 2021-09-09 2021-11-30 国网电子商务有限公司 Energy industry cloud network data tracing method and device

Also Published As

Publication number Publication date
CN114938293A (en) 2022-08-23

Similar Documents

Publication Publication Date Title
CN112702228B (en) Service flow limit response method, device, electronic equipment and readable storage medium
CN109756568A (en) Processing method, equipment and the computer readable storage medium of file
CN112631884A (en) Pressure measurement method and device based on data synchronization, computer equipment and storage medium
CN113626512A (en) Data processing method, device, equipment and readable storage medium
CN114938293B (en) NGINX data tracing method, device, equipment and storage medium based on block chain
CN112436943A (en) Request deduplication method, device, equipment and storage medium based on big data
CN114124878B (en) Market data issuing method, device, system, equipment and medium
CN113393288B (en) Order processing information generation method, device, equipment and computer readable medium
CN115016754A (en) Method and device for synchronously displaying pages among devices, electronic device and medium
JP2023031248A (en) Edge computing network, data transmission method, apparatus, device, and storage medium
CN114615325A (en) Message pushing method and device, computer equipment and storage medium
CN114036162A (en) Game NFT work processing method and device
CN113032168B (en) Data transmission rate dynamic adjustment method and device, electronic equipment and storage medium
CN116455997B (en) STEP market multipath forwarding method, STEP market multipath forwarding device, STEP market multipath forwarding equipment and STEP market multipath forwarding medium
CN115002011B (en) Flow bidirectional test method and device, electronic equipment and storage medium
CN116702218B (en) Rendering method, device, terminal and storage medium of three-dimensional model in applet
CN115002100B (en) File transmission method and device, electronic equipment and storage medium
CN112099957B (en) Resource allocation method, system, device and electronic equipment
CN110781523B (en) Method and apparatus for processing information
CN116488931B (en) Information interaction method and device based on distributed networking equipment
CN113872967B (en) Vehicle information transmission method and device, electronic equipment and storage medium
CN113595984B (en) Data transmission method and device combining RPA and AI, electronic equipment and storage medium
CN115174691B (en) Big data loading method, device, equipment and medium based on page request
CN116567074A (en) Financial data cloud sharing method and device based on rapid transmission and electronic equipment
CN115941352A (en) Information security interaction method and device based on big data, electronic equipment and storage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant