Message data protection method and device, electronic equipment and storage medium
By randomizing the message data field name and adding salt hash processing, the problem of message data being easily cracked and tampered is solved, and the data interaction security and system stability between the client and the server are improved.
Patent Information
- Application Number
- CN202510641277.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-19
- Publication Date
- 2025-08-15
AI Technical Summary
In the prior art, message data is easily cracked and maliciously tampered with, and the hard-coded mode leads to large workloads, difficult to maintain, and cannot be flexibly adjusted.
By randomizing the message data field name and adding salt hash processing, the message data interactive between the client and the server is protected to ensure that the field name is meaningless and does not repetitive, and the data integrity is verified using location information.
It improves the security of message data interaction services, reduces low-level risk events, and improves the risk control level and R&D efficiency of system transactions.
Smart Images

Figure CN120498773A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information security technology, and in particular to a message data protection method, device, electronic device and storage medium. Background Art
[0002] In recent years, there have been frequent incidents on the channel side where criminals bypass browser-side data verification and tamper with message data to access the server. Due to the lack of data verification on the server side or the vulnerability of key elements such as messages to cracking, in existing technologies, on the one hand, interface message data is easily cracked and maliciously tampered with, and at the same time, brute force tests can easily lead to the exposure of system verification rules, resulting in greater losses; on the other hand, the use of a hard-coded mode requires developers to implement each scenario by themselves, which is a large workload and cannot be flexibly and uniformly adjusted in an aspect-oriented manner, making it difficult to maintain in the later stage. Summary of the Invention
[0003] The present invention provides a message data protection method, device, electronic device and storage medium to solve the problem that message data is easily cracked and maliciously tampered with, and improve the security of the business corresponding to the message data interaction between the client and the server.
[0004] According to one aspect of the present invention, a message data protection method is provided, the method comprising:
[0005] In response to an execution operation on a target service, first message data corresponding to the target service is acquired; the first message data includes a plurality of first fields; the first fields include a first field name; the first field name is field information related to the target service;
[0006] Determine second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second fields include second field names; the second field names are meaningless field information, and the second field names are not repeated; the first field name of the first field and the second field name of the second field have a corresponding relationship; the second fields are matched with corresponding position information, and the position information of each second field is not repeated;
[0007] In response to instruction information for the second message data, obtaining third message data corresponding to the second message data; the instruction information is information for completing modification of a field value of a third field in the second message data; the third field is a second field in the second field whose field value can be modified;
[0008] Determine whether the third message data has an abnormality based on the first position information and the second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
[0009] According to another aspect of the present invention, a message data protection device is provided, characterized in that the device includes:
[0010] A first data acquisition module is configured to acquire first message data corresponding to the target service in response to an execution operation on the target service; the first message data includes a plurality of first fields; the first fields include a first field name; the first field name is field information related to the target service;
[0011] A data processing module, configured to determine second message data corresponding to first message data, and send the second message data to a client; the second message data includes a plurality of second fields; the second fields include second field names; the second field names are meaningless field information, and the second field names are not repeated; the first field name of the first field corresponds to the second field name of the second field; the second fields are matched with corresponding position information, and the position information of each second field is not repeated;
[0012] a second data acquisition module, configured to acquire, in response to instruction information for the second message data, third message data corresponding to the second message data; the instruction information being information for completing modification of a field value of a third field in the second message data; the third field being a second field in the second field whose field value can be modified;
[0013] A detection module is used to determine whether there is an abnormality in the third message data based on first position information and second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
[0014] According to another aspect of the present invention, an electronic device is provided, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message data protection method described in any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message data protection method described in any embodiment of the present invention when executed.
[0019] The technical solution of the embodiment of the present invention is to obtain first message data corresponding to the target service in response to the execution operation of the target service; the first message data includes multiple first fields; the first field includes a first field name; the first field name is field information related to the target service; determine the second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second field includes a second field name; because the second field name is meaningless field information and each second field name is not repeated; the first field name of the first field has a corresponding relationship with the second field name of the second field; the second field matches the corresponding position information, and the position information of each second field is not repeated, the present invention uses randomization to prevent the client from deciphering the meaning of the field, thereby achieving protection of the message data. Further, in response to instruction information for the second message data, obtain third message data corresponding to the second message data; the instruction information is information for completing the modification of the field value of the third field in the second message data; the third field is a second field in the second field whose field value can be modified; the client is enabled to modify the second field in the second message data, thereby accurately obtaining the third message data. Finally, the first location information is the location information of the second field in the second message data; the second location information is the location information of the second field in the third message data. Based on the first location information and the second location information, it is determined whether there is an abnormality in the third message data, thereby solving the problem that the message data is easily cracked and maliciously tampered with, and improving the security of the business corresponding to the message data interaction between the client and the server.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0022] Figure 1 This is a flow chart of a message data protection method provided according to an embodiment of the present invention;
[0023] Figure 2 is a flowchart of another message data protection method provided according to an embodiment of the present invention;
[0024] Figure 3 This is a structural diagram of a message data protection device provided according to an embodiment of the present invention;
[0025] Figure 4 It is a structural diagram of an electronic device according to an embodiment of the present invention for implementing the message data protection method of the embodiment of the present invention. DETAILED DESCRIPTION
[0026] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0027] It should be noted that the terms "first", "second", "third", "fourth", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] Example 1
[0029] Figure 1 This is a flowchart of a message data protection method provided by an embodiment of the present invention. This embodiment is applicable to protecting the message data of the target business interacting between the server and the client, as well as protecting the security of the interaction between the server and the client. The present invention is applied to the server. The method can be executed by a message data protection device. The message data protection device can be implemented in the form of hardware and / or software. The message data protection device can be configured in any electronic device with network communication function. Figure 1 As shown, the message data protection method of the present invention includes:
[0030] S110. In response to an execution operation on a target service, obtain first message data corresponding to the target service; the first message data includes multiple first fields; the first field includes a first field name; the first field name is field information related to the target service.
[0031] The target business can be understood as a business that requires cooperation between the client and the server; for example, for a bank, the business in which a user conducts transactions through the client and the bank's server is the target business.
[0032] The first message data can be understood as the message data of the target business exchanged between the server and the client. The first message data is composed of multiple first fields. The first field includes at least a first field name. The first field may also include a field value corresponding to the first field name. The field value can be understood as the first field name. For example, for banking services, the first field name of the first field may be the loan term, and the field value corresponding to the loan term may be a preset value.
[0033] S120. Determine the second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second field includes a second field name; the second field name is meaningless field information, and each second field name is not repeated; the first field name of the first field and the second field name of the second field have a corresponding relationship; the second field match has corresponding position information, and the position information of each second field is not repeated.
[0034] Specifically, the first field name of the first field is matched to the corresponding second field name, and the second field name is replaced with the first field name of the first field to obtain the second field corresponding to the first field. That is, the second field and the first field correspond to each other, and the first field name corresponds to the second field name. For example, if the first field name of the first field is the loan term, and the loan term is converted to field A, then the second field name is field A. The correspondence between the first field name of the first field and the second field name of the second field is ('loan term': 'A'). In addition, the matching of the first field name of the first field to the corresponding second field name is a random matching process. That is, when executing the target business this time, the first field name of the first field may match the corresponding second field name A. The next time the target business is executed, the first field name of the first field may match the corresponding second field name B. This randomization prevents clients from deciphering the meaning of the fields, thereby protecting message data, improving the system's transaction risk control level to a certain extent, reducing the frequency of low-level risk events, and providing public processing capabilities to improve R&D efficiency.
[0035] Furthermore, the position information of each second field is determined, that is, a position information is randomly matched for each second field, so as to determine the second message data based on the second field and the position information of each second field.
[0036] S130. In response to the instruction information for the second message data, obtain the third message data corresponding to the second message data; the instruction information is information for completing the modification of the field value of the third field in the second message data; the third field is the second field in the second field whose field value can be changed.
[0037] The third field includes a third field name and a field value corresponding to the third field name. The field value corresponding to the third field name can be changed.
[0038] Specifically, the second message data is sent to the client, the client modifies the field value of the third field in the second message data to form third message data corresponding to the second message data, and transmits the third message data back to the server.
[0039] Therefore, if the message data has not been tampered with, the position information corresponding to the second field name of the second field in the third message data should be consistent with the position information corresponding to the second field name of the second field in the second message data.
[0040] S140. Determine whether the third message data has an abnormality based on the first location information and the second location information; the first location information is the location information of the second field in the second message data; the second location information is the location information of the second field in the third message data.
[0041] Specifically, a first arrangement order is determined based on the first position information; the first arrangement order is the arrangement order of each second field in the second message data; a second arrangement order is determined based on the second position information; the second arrangement order is the arrangement order of each second field in the third message data; if the first arrangement order and the second arrangement order are consistent, it is determined that there is no abnormality in the third message data; if the first arrangement order and the second arrangement order are inconsistent, it is determined that there is an abnormality in the third message data.
[0042] The technical solution of the embodiment of the present invention is to obtain first message data corresponding to the target service in response to the execution operation of the target service; the first message data includes multiple first fields; the first field includes a first field name; the first field name is field information related to the target service; determine the second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second field includes a second field name; because the second field name is meaningless field information and each second field name is not repeated; the first field name of the first field has a corresponding relationship with the second field name of the second field; the second field matches the corresponding position information, and the position information of each second field is not repeated, the present invention uses randomization to prevent the client from deciphering the meaning of the field, thereby achieving protection of the message data. Further, in response to instruction information for the second message data, obtain third message data corresponding to the second message data; the instruction information is information for completing the modification of the field value of the third field in the second message data; the third field is a second field in the second field whose field value can be modified; the client is enabled to modify the second field in the second message data, thereby accurately obtaining the third message data. Finally, the first location information is the location information of the second field in the second message data; the second location information is the location information of the second field in the third message data. Based on the first location information and the second location information, it is determined whether there is an abnormality in the third message data, thereby solving the problem that the message data is easily cracked and maliciously tampered with, and improving the security of the business corresponding to the message data interaction between the client and the server.
[0043] Example 2
[0044] Figure 2 This is a flow chart of another message data protection method provided by an embodiment of the present invention. The technical solution of this embodiment further optimizes the process of the above embodiment on the basis of the above embodiment. This embodiment can be combined with various optional solutions in one or more of the above embodiments. Figure 2 As shown, the message data protection method of the present invention includes:
[0045] S210. In response to an execution operation on a target service, obtain first message data corresponding to the target service; the first message data includes multiple first fields; the first field includes a first field name; the first field name is field information related to the target service.
[0046] S220. Determine the second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second field includes a second field name; the second field name is meaningless field information, and the second field names are not repeated; the first field name of the first field and the second field name of the second field have a corresponding relationship; the second field match has corresponding position information, and the position information of each second field is not repeated.
[0047] S230. Perform salted hash processing on the fourth field of the second message data to obtain a first processing result; perform salted hash processing on the second field name of the second field of the second message data to obtain a second processing result, and add the first processing result and the second processing result to the second message data; the second field includes the fourth field, and the fourth field is the second field in the second field whose field value cannot be changed.
[0048] Among them, salted hashing can be done by combining the data to be hashed and the salt value during hashing before performing hash encryption. Even if the data to be hashed is the same, if the salt value is different, the hash value will also be different. This is used to prevent the hash method from being discovered and the system from being cracked. The salt value is the value after the data is salted. In the present invention, salt refers to a string of random data, and salting can be understood as treating this string of data as an additional input to a one-way function (such as a hash function).
[0049] For example, the second message data is {A: 1, B: 2, C: 3}; A and B are immutable fields, and C is a mutable field. Then, salted hashing is performed on A and B to obtain a first processing result, which is {hash(A, B); salted hashing is performed on A, B, and C to obtain a second processing result, which is {hash(A, B, C)}. The first and second processing results are added to the second message data, and the second message data can be expressed as: {A: 1, B: 2, C: 3, {hash(A, B)}, {hash(A, B, C)}}.
[0050] S240. In response to the instruction information for the second message data, obtain the third message data corresponding to the second message data; the instruction information is information for completing the modification of the field value of the third field in the second message data; the third field is the second field in the second field whose field value can be changed.
[0051] S250. Perform salted hash processing on the fourth field of the third message data to obtain a third processing result; perform salted hash processing on the second field name of the second field of the third message data to obtain a fourth processing result, and add the third processing result and the fourth processing result to the third message data.
[0052] Specifically, the processing process of this step is the same as the processing process of S240, which will not be described in detail here.
[0053] S260: Determine whether the third message data is abnormal based on the first processing result and the third processing result.
[0054] Specifically, if the first processing result and the third processing result are consistent, it is determined that there is no abnormality in the third message data, and the subsequent logic of the target business can continue; if the first processing result and the third processing result are inconsistent, it is determined that there is an abnormality in the third message data, and the processing of the subsequent logic of the target business is stopped.
[0055] S270. Determine whether the third message data has an abnormality based on the first position information and the second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
[0056] Specifically, a first arrangement order is determined based on the first position information; the first arrangement order is the arrangement order of each second field in the second message data; a second arrangement order is determined based on the second position information; the second arrangement order is the arrangement order of each second field in the third message data; if the first arrangement order and the second arrangement order are consistent, it is determined that there is no abnormality in the third message data, and the subsequent logic of the target business can be continued; if the first arrangement order and the second arrangement order are inconsistent, it is determined that there is an abnormality in the third message data, and the subsequent logic processing of the target business is stopped.
[0057] S280: Determine whether the third message data is abnormal based on the second processing result and the fourth processing result.
[0058] Specifically, if the second processing result and the fourth processing result are consistent, it is determined that there is no abnormality in the third message data, and the subsequent logic of the target business can continue; if the second processing result and the fourth processing result are inconsistent, it is determined that there is an abnormality in the third message data, and the processing of the subsequent logic of the target business is stopped.
[0059] The technical solution of the embodiment of the present invention is as follows: after determining the second message data, performing salted hash processing on the fourth field of the second message data to obtain a first processing result; performing salted hash processing on the second field name of the second field of the second message data to obtain a second processing result, and adding the first processing result and the second processing result to the second message data to improve the security of the second message data. After obtaining the third message data corresponding to the second message data, performing salted hash processing on the fourth field of the third message data to obtain a third processing result; performing salted hash processing on the second field name of the second field of the third message data to obtain a fourth processing result, and adding the third processing result and the fourth processing result to the third message data, so as to determine whether the third message data is abnormal based on the second processing result and the fourth processing result, determine whether the third message data is abnormal based on the first processing result and the third processing result, and at the same time, determine whether the third message data is abnormal based on the first location information and the second location information. The third message data and the second message data are compared and verified three times, thereby solving the problem that the message data is easily cracked and maliciously tampered with, and improving the security of the service corresponding to the message data interaction between the client and the server.
[0060] Example 3
[0061] Figure 3 This is a schematic diagram of the structure of a message data protection device provided by an embodiment of the present invention. This embodiment is applicable to protecting the message data of the target business interacting between the server and the client, as well as protecting the security of the interaction between the server and the client. The message data protection device can be implemented in the form of hardware and / or software, and can be configured in any electronic device with network communication function. Figure 3 As shown, the message data protection device includes:
[0062] A first data acquisition module 310 is configured to acquire first message data corresponding to a target service in response to an execution operation on the target service; the first message data includes a plurality of first fields; the first fields include first field names; and the first field names are field information related to the target service.
[0063] The data processing module 320 is configured to determine second message data corresponding to the first message data and send the second message data to the client; the second message data includes multiple second fields; the second fields include second field names; the second field names are meaningless field information, and the second field names are not repeated; the first field name of the first field corresponds to the second field name of the second field; the second fields are matched with corresponding position information, and the position information of each second field is not repeated;
[0064] A second data acquisition module 330 is configured to acquire, in response to instruction information for the second message data, third message data corresponding to the second message data; the instruction information is information for completing modification of a field value of a third field in the second message data; the third field is a second field in the second field whose field value can be modified;
[0065] The detection module 340 is used to determine whether there is an abnormality in the third message data based on the first position information and the second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
[0066] Based on the above embodiment, optionally, a data processing module is used to: match the first field name of the first field with the corresponding second field name, replace the first field name of the first field with the second field name, obtain the second field corresponding to the first field, and determine the position information of each second field; determine the second message data based on the second field and the position information of each second field.
[0067] Based on the above embodiment, optionally, the second field includes a fourth field, and the fourth field is a second field whose field value in the second field cannot be changed; accordingly, the data processing module also includes a first salted hash processing unit, and the first salted hash processing unit is used to: perform salted hash processing on the fourth field of the second message data to obtain a first processing result, and add the first processing result to the second message data; perform salted hash processing on the second field name of the second field of the second message data to obtain a second processing result, and add the second processing result to the second message data.
[0068] Based on the above embodiment, optionally, the second data acquisition module also includes a second salted hash processing unit, which is used to: perform salted hash processing on the fourth field of the third message data to obtain a third processing result, and add the third processing result to the second message data; perform salted hash processing on the second field name of the second field of the third message data to obtain a fourth processing result, and add the fourth processing result to the third message data.
[0069] Based on the above embodiment, optionally, the detection module includes a first detection unit, which is used to: determine a first arrangement order based on the first position information; the first arrangement order is the arrangement order of each second field in the second message data; determine a second arrangement order based on the second position information; the second arrangement order is the arrangement order of each second field in the third message data; if the first arrangement order and the second arrangement order are consistent, it is determined that there is no abnormality in the third message data; if the first arrangement order and the second arrangement order are inconsistent, it is determined that there is an abnormality in the third message data.
[0070] Based on the above embodiment, optionally, the detection module includes a second detection unit, which is used to: if the first processing result and the third processing result are consistent, determine that there is no abnormality in the third message data; if the first processing result and the third processing result are inconsistent, determine that there is an abnormality in the third message data.
[0071] Based on the above embodiment, optionally, the detection module includes a third detection unit, which is used to: if the second processing result and the fourth processing result are consistent, determine that there is no abnormality in the third message data; if the second processing result and the fourth processing result are inconsistent, determine that there is an abnormality in the third message data.
[0072] The message data protection device provided in the embodiment of the present invention can execute the message data protection method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0073] Example 4
[0074] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0075] Figure 4 A schematic diagram of the structure of an electronic device that can be used to implement the message data protection method of an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0076] like Figure 4As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0077] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0078] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the message data protection method.
[0079] In some embodiments, the message data protection method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the message data protection method described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the message data protection method in any other appropriate manner (e.g., by means of firmware).
[0080] Various embodiments of the systems and techniques described herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0081] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0082] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0083] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0084] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0085] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.
[0086] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.
[0087] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.
Claims
1. A message data protection method, characterized in that: The method comprises: In response to an execution operation on a target service, first message data corresponding to the target service is acquired; the first message data includes a plurality of first fields; the first fields include a first field name; the first field name is field information related to the target service; Determine second message data corresponding to the first message data, and send the second message data to the client; the second message data includes multiple second fields; the second fields include second field names; the second field names are meaningless field information, and the second field names are not repeated; the first field name of the first field and the second field name of the second field have a corresponding relationship; the second fields are matched with corresponding position information, and the position information of each second field is not repeated; In response to instruction information for the second message data, obtaining third message data corresponding to the second message data; the instruction information is information for completing modification of a field value of a third field in the second message data; the third field is a second field in the second field whose field value can be modified; Determine whether the third message data has an abnormality based on the first position information and the second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
2. The method according to claim 1, characterized in that Determining second message data corresponding to the first message data includes: Matching the first field name of the first field with the corresponding second field name, replacing the first field name of the first field with the second field name, obtaining the second field corresponding to the first field, and determining the position information of each of the second fields; The second message data is determined based on the second field and the position information of each of the second fields.
3. The method according to claim 1, characterized in that The second field includes a fourth field, and the fourth field is a second field whose field value in the second field cannot be changed; Correspondingly, after determining the second message data corresponding to the first message data, the method further includes: Performing salted hash processing on the fourth field of the second message data to obtain a first processing result, and adding the first processing result to the second message data; Perform salted hash processing on the second field name of the second field of the second message data to obtain a second processing result, and add the second processing result to the second message data.
4. The method according to claim 3, characterized in that After obtaining the third message data corresponding to the second message data, the method further includes: Performing salted hash processing on the fourth field of the third message data to obtain a third processing result, and adding the third processing result to the second message data; Perform salted hash processing on the second field name of the second field of the third message data to obtain a fourth processing result, and add the fourth processing result to the third message data.
5. The method according to claim 4, characterized in that Determining whether the third message data is abnormal according to the first location information and the second location information includes: Determining a first arrangement order according to the first position information; the first arrangement order is the arrangement order of each second field in the second message data; Determining a second arrangement order according to the second position information; the second arrangement order is the arrangement order of each second field in the third message data; If the first arrangement order is consistent with the second arrangement order, determining that there is no abnormality in the third message data; If the first arrangement order is inconsistent with the second arrangement order, it is determined that an abnormality exists in the third message data.
6. The method according to claim 5, characterized in that Before determining that the third message data does not have an abnormality, the method includes: If the first processing result is consistent with the third processing result, determining that there is no abnormality in the third message data; If the first processing result and the third processing result are inconsistent, it is determined that an abnormality exists in the third message data.
7. The method according to claim 5 or 6, characterized in that After determining that there is no abnormality in the third message data, the method includes: If the second processing result is consistent with the fourth processing result, it is determined that there is no abnormality in the third message data; If the second processing result and the fourth processing result are inconsistent, it is determined that an abnormality exists in the third message data.
8. A message data protection device, characterized in that: The device comprises: A first data acquisition module is configured to acquire, in response to an execution operation on a target service, first message data corresponding to the target service; the first message data includes a plurality of first fields; the first fields include a first field name; the first field name is field information related to the target service; A data processing module, configured to determine second message data corresponding to first message data, and send the second message data to a client; the second message data includes a plurality of second fields; the second fields include second field names; the second field names are meaningless field information, and the second field names are not repeated; the first field name of the first field corresponds to the second field name of the second field; the second fields are matched with corresponding position information, and the position information of each second field is not repeated; a second data acquisition module, configured to acquire, in response to instruction information for the second message data, third message data corresponding to the second message data; the instruction information being information for completing modification of a field value of a third field in the second message data; the third field being a second field in the second field whose field value can be modified; A detection module is used to determine whether there is an abnormality in the third message data based on first position information and second position information; the first position information is the position information of the second field in the second message data; the second position information is the position information of the second field in the third message data.
9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the message data protection method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the message data protection method according to any one of claims 1 to 7 when executed.