CN116405210B - Network message label confusion method and device and electronic equipment - Google Patents

Network message label confusion method and device and electronic equipment Download PDF

Info

Publication number
CN116405210B
CN116405210B CN202310615805.6A CN202310615805A CN116405210B CN 116405210 B CN116405210 B CN 116405210B CN 202310615805 A CN202310615805 A CN 202310615805A CN 116405210 B CN116405210 B CN 116405210B
Authority
CN
China
Prior art keywords
label
information
confusion
mask information
target
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
CN202310615805.6A
Other languages
Chinese (zh)
Other versions
CN116405210A (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.)
University of Chinese Academy of Sciences
Original Assignee
University of Chinese Academy of Sciences
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 University of Chinese Academy of Sciences filed Critical University of Chinese Academy of Sciences
Priority to CN202310615805.6A priority Critical patent/CN116405210B/en
Publication of CN116405210A publication Critical patent/CN116405210A/en
Application granted granted Critical
Publication of CN116405210B publication Critical patent/CN116405210B/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
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords
    • H04L9/0869Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • 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/40Network security protocols
    • 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
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure provides a method, a device and electronic equipment for confusion of network message labels, which are applied to the technical field of network communication. The method comprises the steps of obtaining the label number, the target labels and the expansion times of the target network message; corresponding mask information is determined according to the number of the tags and the expansion multiples, and the determined mask information is expanded according to the expansion multiples, so that expanded mask information is obtained; generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple; obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number; and mapping the confusion information according to the target label to generate a confusion label. In this way, the labels can be confused, the difficulty of identifying the labels is increased, and the security of network message transmission is improved.

Description

Network message label confusion method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of network communication, and in particular relates to a method and a device for confusion of network message labels and electronic equipment.
Background
TLV (Tag Length Value) or KLV (Key Length Value) is a common format used in network protocols, and in a broad sense, it is not a fixed format protocol, but may be a protocol defined by a person for network communication, and communication can be established only by following a packing and unpacking procedure of a person. From application layer HTTP (Hyper Text Transfer Protocol, hyperText markup-up Language) to HTML (Extensible Markup Language ), they provide a specification for the formatted storage, transmission and formatted display of data, which is the basis for network communications. However, the HTTP protocol and the HTML/XML markup language essentially define a stack of tags (tags) to serialize and sequence data, and then the receiver parses and restores the data according to the tags. The key of the custom communication protocol is the reasonable construction and correct parsing of the data packets, i.e. the formulation of codec rules. The coding mode for determining the length of ASN (Abstract Syntax Notation ) and BER (Basic Encoding Rules, basic coding rule) consists of 3 parts: identifier octets (Identifier octets), length octets (Length octets) and content octets (Contents octets), which are in fact a TLV model: the type field is information about the tag and the encoding format; the length field defines the length of the value; the content field indicates the actual value. Thus, one encoded value is also known as a TLV triplet. The code may be basic or structured, if it represents a simple type of complete explicit value, then the code is basic; if the value it represents has a nested structure, then the code is structured. The TLV coding means that a type field, a length field and a content field are coded to form a bit stream data packet; decoding is the inverse of encoding and is the parsing of the original data from the bitstream buffer.
Different meanings represented by different types of fields are distinguished in a TLV or KLV protocol through Tag (Tag) fields, and usually the Tag (Tag) is a fixed value, so that the Tag (Tag) is widely applied to network message transmission and network protocol design due to the advantages of flexibility, convenience and variable content length, but the fixed Tag (Tag) cannot be encrypted in many scenes. Thus, tags (tags) may be used as an implied protocol to act as a feature of a message or application and even be analyzed, cracked and exploited, reducing the security of network message transmissions.
Disclosure of Invention
The disclosure provides a network message label confusion method, a device and electronic equipment.
According to a first aspect of the present disclosure, a network message label obfuscation method is provided. The method comprises the following steps:
acquiring the number of labels, target labels and expansion multiples of a target network message; wherein, the target label is one or more of labels of the target network message;
corresponding mask information is determined according to the number of the tags and the expansion multiples, and the determined mask information is expanded according to the expansion multiples, so that expanded mask information is obtained;
generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple;
obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number;
and mapping the confusion information according to the target label to generate a confusion label.
Further, it is characterized in that,
the mask information is stored in a preset mask library, the preset mask library stores the corresponding relation between the number of tags and the expansion multiple and the mask information, wherein one group of the number of tags and the expansion multiple correspond to one mask information, and the corresponding mask information is determined according to the number of tags and the expansion multiple, and the mask information comprises:
and determining mask information according to the number of the labels and the corresponding relation between the expansion multiple and the mask information.
Further, the generating a random number based on a random algorithm according to the number of tags and the expansion multiple includes:
determining bit positions of the target labels according to the label quantity;
calculating bit positions of the target tag according to the expansion multiples to obtain mixed bit positions of the target tag;
and generating random numbers with equal digits according to the mixed bit of the target tag based on a random algorithm.
Further, a calculation formula for determining bit positions of the target tag according to the tag number is as follows:
wherein i is a positive integer, A is the bit of the target tag, and n is the number of tags.
Further, the obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number includes:
non-processing is carried out on the expanded mask information to obtain target mask information;
and performing an exclusive OR operation on the target mask information and the random number to generate confusion information.
Further, the mask information includes a bit for identifying tag information, and the mapping processing is performed on the confusion information according to the target tag to generate a confusion tag, which includes:
determining bit carrying label information according to the mask information;
determining the bit of the label bearing information of the expanded mask information according to the determined bit of the label bearing information;
using the bit of the same position as the bit of the label information of the expanded mask information as the bit of the label information of the confusion information;
and replacing the bit data of the label information bearing of the confusion information according to the sequence of each bit of data of the target label to obtain the confusion label.
Further, the method further comprises:
replacing the corresponding target label of the target network message according to the confusion label to generate a network message to be transmitted;
and sending the label number, the expansion times, the identification of the confusion label and the network message to be transmitted to a receiver.
According to a second aspect of the present disclosure, a network message label confusion method is provided. The method comprises the following steps:
corresponding mask information is determined according to the number of received tags and expansion multiples, and the mask information is expanded according to the expansion multiples, so that expanded mask information is obtained; the mask information is any mask in a preset mask library which is negotiated in advance by both communication parties;
determining the bit of the label information of the expanded mask information according to the bit of the label information of the mask information;
extracting a label to be confused from the received network message; the label to be confused is any one or more labels extracted from the received network message according to the identification of the confused label;
and extracting data of the label to be confused according to the bit carrying the label information of the expanded mask information to obtain a corresponding target label.
According to a third aspect of the present disclosure, a network message label obfuscation apparatus is provided. The device comprises:
the data acquisition module is used for acquiring the label number, the target labels and the expansion multiples of the target network message; wherein, the target label is one or more of labels of the target network message;
the mask information generating module is used for determining corresponding mask information according to the number of the tags and the expansion multiple, expanding the determined mask information according to the expansion multiple and obtaining expanded mask information;
the random number generation module is used for generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple;
the confusion information generation module is used for obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number;
and the confusion label generating module is used for carrying out mapping processing on the confusion information according to the target label to generate a confusion label.
According to a fourth aspect of the present disclosure, an electronic device is provided. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method as described above when executing the program.
According to a fifth aspect of the present disclosure, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as described above.
The embodiment of the disclosure provides a method, a device and electronic equipment for confusion of network message labels, wherein the method comprises the steps of obtaining the label number, target labels and expansion multiples of target network messages; corresponding mask information is determined according to the number of the tags and the expansion multiples, and the determined mask information is expanded according to the expansion multiples, so that expanded mask information is obtained; generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple; obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number; and mapping the confusion information according to the target label to generate a confusion label. In this way, the labels can be confused, the difficulty of identifying the labels is increased, and the security of network message transmission is improved.
It should be understood that what is described in this summary is not intended to limit the critical or essential features of the embodiments of the disclosure nor to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The above and other features, advantages and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. For a better understanding of the present disclosure, and without limiting the disclosure thereto, the same or similar reference numerals denote the same or similar elements, wherein:
FIG. 1 illustrates a flow chart of a network message label obfuscation method according to an embodiment of the present disclosure;
FIG. 2 shows a flow chart of a random number generation process according to the present disclosure;
FIG. 3 illustrates a flow chart of an confusion label generation process according to the present disclosure;
FIG. 4 illustrates a flow chart of a network message label defrobation method according to an embodiment of the disclosure;
fig. 5 shows a block diagram of a network message label obfuscation apparatus according to an embodiment of the disclosure;
fig. 6 illustrates a block diagram of an exemplary electronic device capable of implementing embodiments of the present disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 1 illustrates a flow chart of a network message label obfuscation method 100 according to an embodiment of the present disclosure. The method 100 comprises the following steps:
step 110, obtaining the number of labels, the target labels and the expansion times of the target network message.
Wherein the target label is one or more of labels of the target network message.
In some embodiments, the labels, the number of labels, and the expansion multiples of the network message are obtained, and one or more of the obtained labels are determined for confusion processing.
And 120, determining corresponding mask information according to the number of the tags and the expansion multiple, and expanding the determined mask information according to the expansion multiple to obtain expanded mask information.
In some embodiments, the sender presets a mask library, where mask information, the number of tags, and the correspondence between expansion factors and the mask information are stored in the preset mask library, where a set of the number of tags and the expansion factors corresponds to one mask information, that is, a set of the correspondence includes: the number of tags of a type, an expansion multiple and corresponding mask information. For example, the number of tags is less than or equal to 16, the expansion multiple is 8 times, and the corresponding mask information is 0000 0001, wherein the last bit of the mask information represents the information bearing bit of the tag, belongs to a rule agreed in advance by both communication parties, and is convenient for a receiver to quickly de-confuse according to the information bearing bit, so that the de-confusion efficiency is improved. Meanwhile, under the condition that a third party cannot know the rule due to the advanced negotiation of the rule, confusion is difficult to be solved.
In some embodiments, the mask information is determined based on the number of tags and the correspondence of the expansion multiple to the mask information. For example, the number of tags is 10, the expansion multiple is 8 times according to the number of tags being less than or equal to 16, the corresponding mask information is 0000 0001, and the determined mask information is expanded according to the expansion multiple to obtain the expanded mask information, namely, the mask information is expanded by 1/2 times of 8 times, namely, 4 times, so that the expanded mask information is 0000 0001 0000 0001 0000 0001 0000 0001. It should be noted that it is necessary to ensure that the bit numbers of the extended mask information and the random number are the same.
And 130, generating random numbers based on a random algorithm according to the number of the tags and the expansion multiple.
In some embodiments, the random number generation process flow diagram as shown in fig. 2 includes the steps of:
and step 210, determining bit of the target tag according to the tag number.
And 220, calculating the bit of the target tag according to the expansion multiple to obtain the confusion bit of the target tag.
And 230, generating random numbers with equal digits according to the mixed bit of the target tag based on a random algorithm.
In some embodiments, the bit of the target tag is determined according to the number of tags as follows:
wherein i is a positive integer, A is the bit of the target tag, and n is the number of tags.
In some embodiments, for example, the number of tags is 10, i.e., the number of tags is 16 or less, i.e., the calculated bits of the target tag is 4 bits, and 200 tags require 8 bits to represent. Then multiplying 4 bits according to 8 times of expansion multiple to obtain a mixed bit of 32 bits of the target tag, and then generating a random number with 32 bits of bits according to a random algorithm, for example, a random number: "0010 1001 1111 0010 0000 1010 1011 0010". The random number of each label can be different, so that the security of the label after confusion is improved, and the difficulty is increased for a third party to correctly crack the label.
And 140, obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number.
In some embodiments, the expanded mask information is not processed to obtain the target mask information. For example, the expanded mask information is "0000 0001 0000 0001 0000 0001 0000 0001" and the target mask information obtained by performing the negation process is "1111 1110 1111 1110 1111 1110 1111 1110". Then, the obtained target mask information and the random number are subjected to an exclusive nor operation to obtain confusion information "0010 1000 1111 0010 0000 1010 1011 0010".
And step 150, mapping the confusion information according to the target label to generate a confusion label.
In some embodiments, the confusion label generating process flow chart shown in fig. 3, wherein the confusion label generating process flow chart involves performing mapping processing on the confusion information according to the target label, includes the following steps:
step 310, determining bit carrying label information according to the mask information.
Step 320, determining the bit of the extended mask information carrying the tag information according to the determined bit of the carrying the tag information.
And 330, taking the bit at the same position as the bit carrying the tag information of the expanded mask information as the bit carrying the tag information of the confusion information.
And 340, replacing the bit data of the label information bearing of the confusion information with each bit data of the target label according to the sequence, so as to obtain the confusion label.
In some embodiments, the mask information is "0000 0001", where the last bit of the mask information represents the information bearing bit of the tag, then the bit of the extended mask information bearing the tag information is "0000 0001 0000 0001 0000 0001 0000 0001"underlined bits. Then the bit of the obfuscated information carrying the tag information is "0010 1000 1111 0010 0000 1010 1011 0010"underlined bits. For example, a label is obfuscated, the target label is "0011", each bit of data of the target label is mapped onto the bit of the obfuscated information carrying the label information in order, and the original data is replaced to obtain an obfuscated label "0010 1000 1111 0010 0000 1011 1011 0011".
Because the random numbers of each label are different and the mask information is unknown to the third party, the third party cannot acquire the correct label by searching rules and analyze the characteristics of the message, thereby improving the safety of network message transmission.
Based on the foregoing embodiments, replacing the label of the target network packet with the confusion label in another embodiment provided in the present disclosure includes: replacing the corresponding target label of the target network message according to the confusion label to generate a network message to be transmitted; and sending the label number, the expansion times, the identification of the confusion label and the network message to be transmitted to a receiver.
In some embodiments, some or all of the labels in the network packet may be replaced, if some of the labels are replaced, the replaced labels need to be identified, and the identification is sent to the receiver together, so that the receiver determines the replaced labels according to the identification, and then performs confusion elimination.
In some embodiments, the expansion multiple may be set to a fixed value without considering any selection of the expansion multiple, and then only the corresponding mask information is acquired according to the number of the tags and confusion processing is performed.
Fig. 4 illustrates a flow chart of a network message label defrobation method 400 according to an embodiment of the disclosure. The method 400 includes:
step 410, determining corresponding mask information according to the number of received tags and expansion multiples, and expanding the mask information according to the expansion multiples to obtain expanded mask information.
The mask information is any mask in a preset mask library which is negotiated in advance by both communication parties.
Step 420, determining the bit of the extended mask information carrying the tag information according to the bit of the mask information carrying the tag information.
And step 430, extracting the label to be confused from the received network message.
The label to be confused is any one or more labels extracted from the received network message according to the identification of the confused label.
And step 440, extracting data of the label to be confused according to the bit of the label information of the expanded mask information to obtain a corresponding target label.
In some embodiments, the receiving party also stores the corresponding relation between the number of tags and the expansion multiple negotiated with the sending party in advance and the mask information, the corresponding mask information can be determined by determining the corresponding mask information according to the received number of tags and the expansion multiple, and then the confusion is removed according to the bit of the mask information carrying the tag information, so as to obtain the correct tag.
In some embodiments, if the received information has no label identifier, it indicates that the target network message carries out confusion processing on the labels in the message, so that the receiver needs to carry out confusion processing on all the labels one by one; if the received information has the label identification, the label to be confused is determined according to the identification, and then the confusion is removed.
The receiver can be confused according to the mask information negotiated in advance, and meanwhile, the mask information is unknown to a third party, so that the third party cannot acquire a correct label through finding rules and analyze the characteristics of the message, and the safety of network message transmission is improved.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present disclosure is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present disclosure. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required by the present disclosure.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the present disclosure through examples of apparatus.
Fig. 5 illustrates a block diagram of a network message label obfuscation apparatus 500 according to an embodiment of the present disclosure. As shown in fig. 5, the apparatus 500 includes:
the data acquisition module 510 is configured to acquire the number of tags, the target tag, and the expansion multiple of the target network packet; wherein, the target label is one or more of labels of the target network message;
the mask information generating module 520 is configured to determine corresponding mask information according to the number of tags and the expansion multiple, and expand the determined mask information according to the expansion multiple to obtain expanded mask information;
a random number generation module 530, configured to generate a random number based on a random algorithm according to the number of tags and the expansion multiple;
the confusion information generating module 540 is configured to obtain confusion information based on a preset algorithm according to the expanded mask information and the random number;
and the confusion label generating module 550 is configured to perform mapping processing on the confusion information according to the target label, and generate a confusion label.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
According to an embodiment of the disclosure, the disclosure further provides an electronic device, a readable storage medium.
Fig. 6 shows a schematic block diagram of an electronic device 600 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
The electronic device 600 includes a computing unit 601 that can perform various appropriate actions and processes according to a computer program stored in a ROM602 or a computer program loaded from a storage unit 608 into a RAM 603. In the RAM603, various programs and data required for the operation of the electronic device 600 can also be stored. The computing unit 601, ROM602, and RAM603 are connected to each other by a bus 604. An I/O interface 605 is also connected to bus 604.
A number of components in the electronic device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the electronic device 600 to exchange information/data with other devices through a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as method 100 and/or method 400. For example, in some embodiments, method 100 and/or method 400 may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 600 via the ROM602 and/or the communication unit 609. When the computer program is loaded into RAM603 and executed by computing unit 601, one or more steps of method 100 and/or method 400 described above may be performed. Alternatively, in other embodiments, computing unit 601 may be configured to perform method 100 and/or method 400 by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. The network message label confusion method is applied to a sender and is characterized by comprising the following steps of:
acquiring the number of labels, target labels and expansion multiples of a target network message; wherein, the target label is one or more of labels of the target network message;
corresponding mask information is determined according to the number of the tags and the expansion multiples, and the determined mask information is expanded according to the expansion multiples, so that expanded mask information is obtained;
generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple;
obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number;
and mapping the confusion information according to the target label to generate a confusion label.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the mask information is stored in a preset mask library, the preset mask library stores the corresponding relation between the number of tags and the expansion multiple and the mask information, wherein one group of the number of tags and the expansion multiple correspond to one mask information, and the corresponding mask information is determined according to the number of tags and the expansion multiple, and the mask information comprises:
and determining mask information according to the number of the labels and the corresponding relation between the expansion multiple and the mask information.
3. The method of claim 1, wherein the generating a random number based on a random algorithm based on the number of tags and the expansion factor comprises:
determining bit positions of the target labels according to the label quantity;
calculating bit positions of the target tag according to the expansion multiples to obtain mixed bit positions of the target tag;
and generating random numbers with equal digits according to the mixed bit of the target tag based on a random algorithm.
4. A method according to claim 3, wherein the bit of the target tag is determined according to the number of tags as follows:
wherein i is a positive integer, A is the bit of the target tag, and n is the number of tags.
5. The method according to claim 1, wherein the deriving confusion information based on a preset algorithm based on the extended mask information and the random number includes:
non-processing is carried out on the expanded mask information to obtain target mask information;
and performing an exclusive OR operation on the target mask information and the random number to generate confusion information.
6. The method of claim 1, wherein the mask information includes bit bits identifying tag information, wherein the mapping the confusion information according to the target tag to generate a confusion tag includes:
determining bit carrying label information according to the mask information;
determining the bit of the label bearing information of the expanded mask information according to the determined bit of the label bearing information;
using the bit of the same position as the bit of the label information of the expanded mask information as the bit of the label information of the confusion information;
and replacing the bit data of the label information bearing of the confusion information according to the sequence of each bit of data of the target label to obtain the confusion label.
7. The method according to claim 1, wherein the method further comprises:
replacing the corresponding target label of the target network message according to the confusion label to generate a network message to be transmitted;
and sending the label number, the expansion times, the identification of the confusion label and the network message to be transmitted to a receiver.
8. The network message label confusion method is applied to a receiver and is characterized in that the receiver carries out confusion on received confusion labels and comprises the following steps:
corresponding mask information is determined according to the number of received tags and expansion multiples, and the mask information is expanded according to the expansion multiples, so that expanded mask information is obtained; the mask information is any mask in a preset mask library which is negotiated in advance by both communication parties;
determining the bit of the label information of the expanded mask information according to the bit of the label information of the mask information;
extracting a label to be confused from the received network message; the label to be confused is any one or more labels extracted from the received network message according to the identification of the confused label;
and extracting data of the label to be confused according to the bit carrying the label information of the expanded mask information to obtain a corresponding target label.
9. A network message label obfuscation apparatus, comprising:
the data acquisition module is used for acquiring the label number, the target labels and the expansion multiples of the target network message; wherein, the target label is one or more of labels of the target network message;
the mask information generating module is used for determining corresponding mask information according to the number of the tags and the expansion multiple, expanding the determined mask information according to the expansion multiple and obtaining expanded mask information;
the random number generation module is used for generating random numbers based on a random algorithm according to the number of the labels and the expansion multiple;
the confusion information generation module is used for obtaining confusion information based on a preset algorithm according to the expanded mask information and the random number;
and the confusion label generating module is used for carrying out mapping processing on the confusion information according to the target label to generate a confusion label.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
CN202310615805.6A 2023-05-29 2023-05-29 Network message label confusion method and device and electronic equipment Active CN116405210B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310615805.6A CN116405210B (en) 2023-05-29 2023-05-29 Network message label confusion method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310615805.6A CN116405210B (en) 2023-05-29 2023-05-29 Network message label confusion method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN116405210A CN116405210A (en) 2023-07-07
CN116405210B true CN116405210B (en) 2023-08-15

Family

ID=87020122

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310615805.6A Active CN116405210B (en) 2023-05-29 2023-05-29 Network message label confusion method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN116405210B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166822A (en) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 Data protecting method and device
CN114567450A (en) * 2020-11-27 2022-05-31 华为技术有限公司 Protocol message processing method and device
CN114840861A (en) * 2022-04-15 2022-08-02 青岛海尔科技有限公司 Data processing method, device, equipment and storage medium
CN114978519A (en) * 2021-02-22 2022-08-30 中国移动通信有限公司研究院 Message sending method, signature information generation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9621520B2 (en) * 2015-03-19 2017-04-11 Cisco Technology, Inc. Network service packet header security

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104166822A (en) * 2013-05-20 2014-11-26 阿里巴巴集团控股有限公司 Data protecting method and device
CN114567450A (en) * 2020-11-27 2022-05-31 华为技术有限公司 Protocol message processing method and device
CN114978519A (en) * 2021-02-22 2022-08-30 中国移动通信有限公司研究院 Message sending method, signature information generation method and device
CN114840861A (en) * 2022-04-15 2022-08-02 青岛海尔科技有限公司 Data processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN116405210A (en) 2023-07-07

Similar Documents

Publication Publication Date Title
CN112184367B (en) Order processing method and device
CN113408299B (en) Training method, device, equipment and storage medium of semantic representation model
CN106407201B (en) Data processing method and device and computer readable storage medium
CN113590858B (en) Target object generation method and device, electronic equipment and storage medium
CN108733317B (en) Data storage method and device
CN107529132B (en) Method and device for transmitting data between Bluetooth device and application program
WO2012129684A1 (en) Transforming http requests into web services trust messages for security processing
US7895347B2 (en) Compact encoding of arbitrary length binary objects
CN116405210B (en) Network message label confusion method and device and electronic equipment
CN113904943A (en) Account detection method and device, electronic equipment and storage medium
CN116302218B (en) Function information adding method, device, equipment and storage medium
CN115587382B (en) Fully-encrypted data processing method, device, equipment and medium
CN115982675A (en) Document processing method, device, electronic equipment and storage medium
CN115757624A (en) Data processing method and device, electronic equipment and storage medium
CN116863949A (en) Communication receiving method and device thereof
CN113760343A (en) Method and device for processing service request
CN113779018A (en) Data processing method and device
CN115396183B (en) User identity recognition method and device
CN115034198B (en) Method for optimizing computation of embedded module in language model
CN113824546B (en) Method and device for generating information
Li et al. Compression strategy of structured text based on prior dictionary for data distribution system
CN112650601B (en) Method, apparatus, device, storage medium, and program for opening applet across hosts
CN117272970B (en) Document generation method, device, equipment and storage medium
CN113963433B (en) Motion search method, motion search device, electronic equipment and storage medium
CN113641428B (en) Method and device for acquiring special effect scene packet, electronic equipment and readable storage medium

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