[go: up one dir, main page]

CN119473660A - A parameter transmission method, device, equipment and storage medium based on JSON - Google Patents

A parameter transmission method, device, equipment and storage medium based on JSON Download PDF

Info

Publication number
CN119473660A
CN119473660A CN202411637470.9A CN202411637470A CN119473660A CN 119473660 A CN119473660 A CN 119473660A CN 202411637470 A CN202411637470 A CN 202411637470A CN 119473660 A CN119473660 A CN 119473660A
Authority
CN
China
Prior art keywords
encryption
interface
parameters
json
parameter
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.)
Pending
Application number
CN202411637470.9A
Other languages
Chinese (zh)
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.)
Guangdong Eshore Technology Co Ltd
Original Assignee
Guangdong Eshore Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Eshore Technology Co Ltd filed Critical Guangdong Eshore Technology Co Ltd
Priority to CN202411637470.9A priority Critical patent/CN119473660A/en
Publication of CN119473660A publication Critical patent/CN119473660A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)

Abstract

本申请提出一种基于JSON的参数传输方法、装置、设备及存储介质,基于JSON的参数传输方法通过初始化API接口获取动态加密参数以及通过JSON接口获取输入参数,确定JSON接口的接口类型,根据接口类型及动态加密参数,对输入参数进行第一加密处理得到加密报文,将加密报文传输至后端,对加密报文进行解密验证得到解密验证结果,当解密验证结果表征解密成功,通过后端响应于输入参数确定输出参数,并将输出参数进行第二加密处理后返回,利用动态加密参数进行加密,有利于防止反向编译破解加密参数的情况发生,提高安全性;基于不同的接口类型针对性加密处理,适应不同的业务场景。

The present application proposes a JSON-based parameter transmission method, apparatus, device and storage medium. The JSON-based parameter transmission method obtains dynamic encryption parameters by initializing an API interface and obtains input parameters through a JSON interface, determines the interface type of the JSON interface, performs a first encryption process on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message, transmits the encrypted message to a backend, decrypts and verifies the encrypted message to obtain a decryption verification result, and when the decryption verification result indicates that the decryption is successful, determines the output parameters in response to the input parameters through the backend, performs a second encryption process on the output parameters and returns them, and uses dynamic encryption parameters for encryption, which is beneficial to preventing the occurrence of reverse compilation and cracking of the encrypted parameters, thereby improving security; targeted encryption processing is performed based on different interface types to adapt to different business scenarios.

Description

Parameter transmission method, device, equipment and storage medium based on JSON
Technical Field
The present application relates to the field of computer technologies, and in particular, to a parameter transmission method, device, equipment and storage medium based on JSON.
Background
Under the current technical environment, numerous web applications and website developments rely on web technology, online contacts automatically download and run JavaScript scripting language through a browser, and the language is an interpreted scripting language, the code of which is presented in a plaintext form. And, the information communication between the front end and the back end can be realized only by using a JSON plaintext data format based on an API interface, so that the information communication is very easy to steal.
At present, the web application security is usually protected by adopting a code confusion mode and encrypting API interface interaction, local variables and local functions in codes are replaced by random names, blank characters are removed, and therefore the readability of the codes is reduced, meanwhile, front and back end personnel agree on secret keys, the input and output parameters are decrypted, however, due to the characteristics of JavaScript codes, the secret keys are basically exposed in a public network in a plaintext form, and encryption rules are also clearly visible in the codes, so that a professional technician can read a front end source code key to reversely compile encryption parameters such as a decryption secret key, and the security is still low.
Disclosure of Invention
The embodiment of the application provides a parameter transmission method, device, equipment and storage medium based on JSON (Java Server object) to solve at least one problem existing in the related art, and the technical scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for parameter transmission based on JSON, including:
acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface;
determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message;
transmitting the encrypted message to a rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result;
And when the decryption verification result represents that decryption is successful, determining an output parameter by the rear end in response to the input parameter, and returning the output parameter after performing second encryption processing.
In one embodiment, the dynamic encryption parameters include a ticket and a dynamic key parameter, and the obtaining the dynamic encryption parameters through the initializing API interface includes:
the front end sends an initialization request for the API interface;
and responding to the initialization request by the back end, and sending a bill to the front end so that the front end generates dynamic key parameters required by encryption.
In one embodiment, the performing, according to the interface type and the dynamic encryption parameter, a first encryption process on the input parameter to obtain an encrypted message includes:
Determining a target parameter from the input parameters according to the interface type;
and carrying out first encryption processing on the target parameter and the bill according to the dynamic key parameter to obtain an encrypted message.
In one embodiment, the determining the target parameter from the input parameters according to the interface type includes:
when the interface type is a full-entry secret type interface, determining the input parameter as a target parameter;
And when the interface type is a part of the input secret type interface, determining irregular parameters in the input parameters as target parameters.
In one embodiment, the performing, according to the dynamic key parameter, a first encryption process on the target parameter and the ticket to obtain an encrypted message includes:
performing AES encryption on the target parameter and the bill by utilizing the dynamic key parameter to obtain an AES encryption result;
and carrying out secondary encryption on the AES encryption result through an asymmetric encryption algorithm to obtain an encrypted message, wherein a header of the encrypted message comprises the dynamic key parameter.
In one embodiment, the performing decryption verification on the encrypted message, and obtaining a decryption verification result includes:
decrypting the encrypted message, and determining the function type of the JSON interface when the encrypted message is successfully decrypted to obtain the bill;
And determining the using state of the bill, and determining a decryption verification result according to the function type and the using state.
In one embodiment, the determining the decryption verification result according to the function type and the usage state includes:
when the function type is a query type, if the use time in the use state is smaller than or equal to a time threshold value, determining a decryption verification result representing that decryption is successful;
And when the function type is a transaction type, if the use times in the use state are smaller than or equal to a times threshold value, determining a decryption verification result representing that decryption is successful.
In a second aspect, an embodiment of the present application provides a parameter transmission device based on JSON, including:
The acquisition module is used for acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface;
the encryption module is used for determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message;
the decryption module is used for transmitting the encrypted message to the rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result;
And the output module is used for determining output parameters through the rear end in response to the input parameters when the decryption verification result represents that the decryption is successful, and returning the output parameters after the second encryption processing.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, where the memory stores instructions that are loaded and executed by the processor to implement a method in any one of the embodiments of the above aspects.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium storing a computer program, which when executed implements a method in any one of the embodiments of the above aspects.
The beneficial effects in the technical scheme at least comprise:
The method comprises the steps of obtaining dynamic encryption parameters through an initialization API interface, obtaining input parameters through a JSON interface, determining the interface type of the JSON interface, carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters, obtaining encrypted messages, transmitting the encrypted messages to the rear end, carrying out decryption verification on the encrypted messages to obtain decryption verification results, determining output parameters through the rear end in response to the input parameters when the decryption verification results represent successful decryption, carrying out second encryption processing on the output parameters, and then returning the output parameters, encrypting by utilizing the dynamic encryption parameters, thereby being beneficial to preventing reverse compiling and cracking of the encryption parameters, improving safety, and simultaneously being capable of adapting to different service scenes based on targeted encryption processing of different interface types, and improving flexibility and expandability.
The foregoing summary is for the purpose of the specification only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the present application will become apparent by reference to the drawings and the following detailed description.
Drawings
In the drawings, the same reference numerals refer to the same or similar parts or elements throughout the several views unless otherwise specified. The figures are not necessarily drawn to scale. It is appreciated that these drawings depict only some embodiments according to the disclosure and are not therefore to be considered limiting of its scope.
FIG. 1 is a schematic flow chart of a parameter transmission method based on JSON according to an embodiment of the present application;
fig. 2 is a flow chart of a parameter transmission method based on JSON according to an embodiment of the present application;
FIG. 3 is a block diagram of a JSON-based parameter transmission device according to an embodiment of the present application;
fig. 4 is a block diagram of an electronic device according to an embodiment of the application.
Detailed Description
Hereinafter, only certain exemplary embodiments are briefly described. As will be recognized by those of skill in the pertinent art, the described embodiments may be modified in various different ways without departing from the spirit or scope of the present application. Accordingly, the drawings and description are to be regarded as illustrative in nature and not as restrictive.
Noun interpretation:
JSON (JavaScript Object Notation, JS object profile) is a lightweight data exchange format. Based on a subset of ECMAScript (European Computer Manufacturers Association, js specification formulated by European computer Association), the JSON storage and representation system stores and represents data in a text format completely independent of a programming language, and a concise and clear hierarchical structure enables JSON to be an ideal data exchange language, is easy to read and write by people, is easy to analyze and generate by machines, and effectively improves network transmission efficiency.
The AES encryption algorithm (Advanced Encryption Standard) is a symmetric encryption algorithm, also called an advanced encryption standard, and uses 128-bit, 192-bit or 256-bit keys to encrypt and decrypt data, and has advantages of high strength, high speed, easy implementation, and the like.
The RSA algorithm is an asymmetric encryption algorithm, and is different from the symmetric encryption algorithm in that the RSA algorithm has two different keys, namely a public key and a private key. The public key may be public for encrypting information and the private key is kept secret by the owner for decrypting information encrypted with the public key.
Referring to fig. 1, a flowchart of a JSON-based parameter transmission method according to an embodiment of the present application is shown, and the JSON-based parameter transmission method may at least include steps S100 to S400:
S100, acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface.
S200, determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message.
S300, transmitting the encrypted message to the rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result.
S400, when the decryption verification result represents that decryption is successful, determining output parameters through the rear end in response to the input parameters, and returning the output parameters after performing second encryption processing.
The parameter transmission method based on JSON in the embodiment of the application can be executed through the front end and the back end, and the front end and the back end can be computers, mobile phones, flat plates, cloud servers and the like.
According to the technical scheme, the dynamic encryption parameters are obtained through the initialization API interface, the input parameters are obtained through the JSON interface, the interface type of the JSON interface is determined, the first encryption processing is carried out on the input parameters according to the interface type and the dynamic encryption parameters to obtain the encrypted message, the encrypted message is transmitted to the rear end, the decryption verification is carried out on the encrypted message to obtain a decryption verification result, when the decryption verification result represents successful decryption, the rear end responds to the input parameters to determine the output parameters, the output parameters are returned after the second encryption processing is carried out, the dynamic encryption parameters are utilized for encryption, the situation that the encryption parameters are decoded by reverse compiling is prevented, the safety is improved, meanwhile, the method can adapt to different service scenes based on the specific encryption processing of different interface types, and the flexibility and the expandability are improved.
As shown in fig. 2, in one embodiment, the dynamic encryption parameters include a ticket and a dynamic key parameter, and in step S100, the dynamic encryption parameters are acquired through an initializing API interface, specifically:
the front end sends an initialization request for the API interface, responds to the initialization request based on the BASE64 through the back end, sends a ticket (token) to the front end, decrypts the ticket after the front end receives the ticket, generates dynamic key parameters required by encryption through the BASE64, and provides a basis for the subsequent encryption process.
It should be noted that the dynamic encryption parameters are obtained based on the initialization request, each initialization request generates an effective dynamic encryption parameter, and the dynamic encryption parameter is invalid after being used once, so that the dynamic encryption parameter is dynamic rather than continuously unchanged and effective, and accordingly the dynamic key parameter is dynamic, the dynamic encryption parameter is unpredictable, and the single-use mode can effectively prevent a malicious user from repeatedly requesting an interface, reduce the security risk, and effectively ensure the security of the parameters in the internet transmission process, and effectively prevent information leakage and other various internet security problems caused by packet capturing and cracking of access parameter data.
In one embodiment, a user may access a request JSON interface through a front end, and obtain input parameters (i.e., an entry) associated with the request through the JSON interface.
In one embodiment, the interface types of the JSON interface include, but are not limited to, a full-join secret type interface, a partial-join secret type interface, and a non-encryption type interface. The input parameters (input parameters) are usually controllable, such as number, area code, time and other input parameters, the partial input secret type interfaces are input parameters which are irregular, such as remarks, source channels, picture file streams, picture base64 and the like, and the non-encryption type interfaces are auxiliary type interfaces which are input parameters without sensitive data and are not encrypted.
In one embodiment, in step S200, according to the interface type and the dynamic encryption parameter, a first encryption process is performed on the input parameter to obtain an encrypted message, which includes steps S210-S220:
s210, determining target parameters from the input parameters according to the interface type.
Optionally, when the interface type is a full-entry secret type interface, the input parameters are determined to be target parameters, and when the interface type is a partial-entry secret type interface, irregular parameters in the input parameters are determined to be target parameters. For example, the irregular parameters may be remarks, source channels, picture file streams, picture base64, and the like.
S220, according to the dynamic key parameters, performing first encryption processing on the target parameters and the bill to obtain an encrypted message.
Optionally, steps S2201-S2202 are included:
S2201, performing AES encryption on the target parameter and the bill by utilizing the dynamic key parameter to obtain an AES encryption result;
Optionally, after the front end acquires the bill and determines the target parameter, the front end uses the dynamic key parameter to perform AES encryption on the target parameter and the bill, so as to obtain an AES encryption result. Illustratively, the dynamic key parameters may include a key offset (IV) and a key (key) of AES by which the target parameters and the ticket are AES-encrypted, thereby obtaining an AES encryption result. The AES encryption algorithm has the advantages of high strength, high speed, easiness in implementation and the like, and can effectively protect confidentiality of data.
S2202, performing secondary encryption on the AES encryption result through an asymmetric encryption algorithm to obtain an encrypted message.
And then, performing secondary encryption on an AES encryption result through an asymmetric encryption algorithm such as a public key of an RAS (remote control unit) so as to obtain an encrypted message, wherein a header of the encrypted message comprises a dynamic key parameter and is sent to a rear end together with the encrypted message, the security of the key is ensured by the asymmetric characteristic of the RSA algorithm, the public key is used for encryption, and the private key is used for decryption, so that the difficulty of decryption is increased.
In one embodiment, the encrypted message is transmitted to the back end, and decryption verification is performed on the encrypted message in step S300 to obtain a decryption verification result, which includes steps S310-S320:
S310, decrypting the encrypted message, and determining the function type of the JSON interface when the encrypted message is successfully decrypted to obtain the bill.
Optionally, after the back end receives the encrypted message subjected to double encryption, the encrypted message containing the input parameters (input parameters) is decrypted by using the private key, and if the decryption is successful, the function type of the JSON interface is determined. Among them, the function types include, but are not limited to, query class and transaction class.
Optionally, if the decryption fails, the back end automatically analyzes the reason of the decryption failure and returns to the front end for the user to know and end the flow.
S320, determining the using state of the bill, and determining a decryption verification result according to the function type and the using state.
Optionally, determining the usage status of the ticket, where the usage status includes the usage time and the number of uses, and S320 includes steps S3201-S3202:
S3201, when the function type is query, determining a decryption verification result representing that decryption is successful if the use time in the use state is smaller than or equal to a time threshold.
It should be noted that, for the query class, a manner of setting an expiration time is adopted, and since querying one data may require requesting multiple interfaces, if the interfaces are repeatedly requested to be initialized, resources are wasted, so that the expiration time is set, for example, the time threshold is 2 minutes, and if the expiration time exceeds 2 minutes, the expiration time is expired. In the expiration time, the front end can encrypt by using the dynamic key parameters acquired before, and the initialization interface is not required to be requested again, so that the resource waste caused by frequent request of the initialization interface is avoided, and the efficiency is improved.
Illustratively, the time threshold is 2 minutes, which may be based on actual adjustment in other embodiments. Therefore, when the function type is the query type, if the use time in the use state is less than or equal to 2 minutes, the ticket is considered to be valid, the decryption verification result which represents that the decryption is successful is determined, otherwise, the ticket is determined to be invalid, and the decryption verification result which represents that the decryption is failed is determined.
S3202, when the function type is a transaction type, if the number of times of use in the use state is smaller than or equal to a threshold value of times, determining a decryption verification result representing that decryption is successful, namely decryption failure.
The threshold number of times is 1, and when the function type is handling, if the number of times in the use state is less than or equal to 1, the ticket is considered to be valid, and a decryption verification result representing that the decryption is successful is determined, otherwise, the ticket is determined to be invalid, and a decryption verification result representing that the decryption is failed, namely the decryption is failed, is determined.
In one embodiment, in step S400, when the decryption verification result indicates that the decryption is successful, since the input parameter is obtained after the decryption, the normal JSON request logic is executed at this time, the output parameter is determined by the back end in response to the input parameter, the output parameter is subjected to the second encryption processing and then returned to the JSON interface, the front end receives the output parameter after the second encryption processing and decrypts, the output parameter is obtained after the decryption is successful, and finally the front end executes the normal logic of the front end page based on the output parameter, for example, the query class or the query result or the transaction result corresponding to the query class is displayed. Note that the second encryption processing may be AES encryption, and if decryption fails, the flow ends.
The method of the embodiment of the application introduces bill validity judgment, is beneficial to ensuring the integrity and the authenticity of data, simultaneously, the scheme can easily realize the upgrading of encryption and decryption functions without changing the original architecture of interface access, whether the front end or the rear end can write a general scheme and practice, reduces development resources and time cost, can formulate personalized schemes such as handling types and inquiry types according to different interface characteristics, has high flexibility, can better adapt to the requirements of various service scenes, adopts a dynamic encryption scheme, greatly improves the safety of the interface, avoids users from maliciously using the same input parameters to repeatedly request for submitting the interface, effectively reduces resource consumption, and can not read data content even if a crawler acquires the data after dynamically encrypting the input parameters because the crawler does not decrypt the required secret key and offset, thereby effectively guaranteeing the safety and confidentiality of the data.
Referring to fig. 3, there is shown a block diagram of a JSON-based parameter transmission apparatus in accordance with an embodiment of the present application, which may include:
The acquisition module is used for acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface;
The encryption module is used for determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message;
The decryption module is used for transmitting the encrypted message to the rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result;
And the output module is used for determining output parameters through the rear end in response to the input parameters when the decryption verification result represents that the decryption is successful, and returning the output parameters after the second encryption processing.
The functions of each module in each device of the embodiments of the present application may be referred to the corresponding descriptions in the above methods, and are not described herein again.
Referring to fig. 4, a block diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device includes a memory 310 and a processor 320, and the memory 310 stores instructions executable on the processor 320, and the processor 320 loads and executes the instructions to implement the JSON-based parameter transmission method in the foregoing embodiment. Wherein the number of memory 310 and processors 320 may be one or more.
In one embodiment, the electronic device further includes a communication interface 330 for communicating with an external device for data interactive transmission. If the memory 310, the processor 320 and the communication interface 330 are implemented independently, the memory 310, the processor 320 and the communication interface 330 may be connected to each other and communicate with each other through buses. The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, peripheral interconnect (Peripheral ComponentInterconnect, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The bus may be classified as an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 310, the processor 320, and the communication interface 330 are integrated on a chip, the memory 310, the processor 320, and the communication interface 330 may communicate with each other through internal interfaces.
An embodiment of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the JSON-based parameter transmission method provided in the above embodiment.
The embodiment of the application also provides a chip, which comprises a processor and is used for calling the instructions stored in the memory from the memory and running the instructions stored in the memory, so that the communication equipment provided with the chip executes the method provided by the embodiment of the application.
The embodiment of the application also provides a chip which comprises an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected through an internal connection path, the processor is used for executing codes in the memory, and when the codes are executed, the processor is used for executing the method provided by the application embodiment.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processor, digital signal processor (DIGITAL SIGNAL processing, DSP), application Specific Integrated Circuit (ASIC), field programmable gate array (fieldprogrammablegate array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc. A general purpose processor may be a microprocessor or any conventional processor or the like. It is noted that the processor may be a processor supporting an advanced reduced instruction set machine (ADVANCED RISC MACHINES, ARM) architecture.
Further, optionally, the memory may include a read-only memory and a random access memory, and may further include a nonvolatile random access memory. The memory may be volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The nonvolatile memory may include a read-only memory (ROM), a Programmable ROM (PROM), an erasable programmable ROM (erasable PROM), an electrically erasable programmable EPROM (EEPROM), or a flash memory, among others. Volatile memory can include random access memory (random access memory, RAM), which acts as external cache memory. By way of example, and not limitation, many forms of RAM are available. For example, static random access memory (STATIC RAM, SRAM), dynamic random access memory (dynamic random access memory, DRAM), synchronous Dynamic Random Access Memory (SDRAM), double data rate synchronous dynamic random access memory (doubledata DATE SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (ENHANCED SDRAM, ESDRAM), synchronous link dynamic random access memory (SYNCHLINK DRAM, SLDRAM), and direct memory bus random access memory (direct rambus RAM, DR RAM).
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions in accordance with the present application are fully or partially produced. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable devices. Computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another.
In the description of the present specification, a description referring to the terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
Any process or method description in a flowchart or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process. And the scope of the preferred embodiments of the present application includes additional implementations in which functions may be performed in a substantially simultaneous manner or in an opposite order from that shown or discussed, including in accordance with the functions that are involved.
Logic and/or steps represented in the flowcharts or otherwise described herein, e.g., a ordered listing of executable instructions for implementing logical functions, can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the methods of the embodiments described above may be performed by a program that, when executed, comprises one or a combination of the steps of the method embodiments, instructs the associated hardware to perform the method.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules described above, if implemented in the form of software functional modules and sold or used as a stand-alone product, may also be stored in a computer-readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that various changes and substitutions are possible within the scope of the present application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (10)

1. The parameter transmission method based on JSON is characterized by comprising the following steps:
acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface;
determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message;
transmitting the encrypted message to a rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result;
And when the decryption verification result represents that decryption is successful, determining an output parameter by the rear end in response to the input parameter, and returning the output parameter after performing second encryption processing.
2. The JSON-based parameter transmission method as set forth in claim 1, wherein the dynamic encryption parameters comprise a ticket and a dynamic key parameter, and the obtaining the dynamic encryption parameters through initializing an API interface comprises:
the front end sends an initialization request for the API interface;
and responding to the initialization request by the back end, and sending a bill to the front end so that the front end generates dynamic key parameters required by encryption.
3. The JSON-based parameter transmission method as set forth in claim 2, wherein the performing a first encryption process on the input parameter according to the interface type and the dynamic encryption parameter to obtain an encrypted message comprises:
Determining a target parameter from the input parameters according to the interface type;
and carrying out first encryption processing on the target parameter and the bill according to the dynamic key parameter to obtain an encrypted message.
4. The JSON-based parameter transmission method as set forth in claim 3, wherein said determining a target parameter from said input parameters according to said interface type comprises:
when the interface type is a full-entry secret type interface, determining the input parameter as a target parameter;
And when the interface type is a part of the input secret type interface, determining irregular parameters in the input parameters as target parameters.
5. The JSON-based parameter transmission method as set forth in claim 3, wherein the performing a first encryption process on the target parameter and the ticket according to the dynamic key parameter to obtain an encrypted message comprises:
performing AES encryption on the target parameter and the bill by utilizing the dynamic key parameter to obtain an AES encryption result;
and carrying out secondary encryption on the AES encryption result through an asymmetric encryption algorithm to obtain an encrypted message, wherein a header of the encrypted message comprises the dynamic key parameter.
6. The JSON-based parameter transmission method of any one of claims 2-5, wherein the performing decryption verification on the encrypted message to obtain a decryption verification result includes:
decrypting the encrypted message, and determining the function type of the JSON interface when the encrypted message is successfully decrypted to obtain the bill;
And determining the using state of the bill, and determining a decryption verification result according to the function type and the using state.
7. The JSON-based parameter transmission method as set forth in claim 6, wherein the determining a decryption verification result according to the function type and the use state comprises:
when the function type is a query type, if the use time in the use state is smaller than or equal to a time threshold value, determining a decryption verification result representing that decryption is successful;
And when the function type is a transaction type, if the use times in the use state are smaller than or equal to a times threshold value, determining a decryption verification result representing that decryption is successful.
8. A JSON-based parameter transmission device, comprising:
The acquisition module is used for acquiring dynamic encryption parameters through an initialization API interface and acquiring input parameters through a JSON interface;
the encryption module is used for determining the interface type of the JSON interface, and carrying out first encryption processing on the input parameters according to the interface type and the dynamic encryption parameters to obtain an encrypted message;
the decryption module is used for transmitting the encrypted message to the rear end, and carrying out decryption verification on the encrypted message to obtain a decryption verification result;
And the output module is used for determining output parameters through the rear end in response to the input parameters when the decryption verification result represents that the decryption is successful, and returning the output parameters after the second encryption processing.
9. An electronic device comprising a processor and a memory, the memory storing instructions that are loaded and executed by the processor to implement the method of any of claims 1-7.
10. A computer readable storage medium having stored therein a computer program which when executed implements the method of any of claims 1-7.
CN202411637470.9A 2024-11-15 2024-11-15 A parameter transmission method, device, equipment and storage medium based on JSON Pending CN119473660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411637470.9A CN119473660A (en) 2024-11-15 2024-11-15 A parameter transmission method, device, equipment and storage medium based on JSON

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411637470.9A CN119473660A (en) 2024-11-15 2024-11-15 A parameter transmission method, device, equipment and storage medium based on JSON

Publications (1)

Publication Number Publication Date
CN119473660A true CN119473660A (en) 2025-02-18

Family

ID=94580315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411637470.9A Pending CN119473660A (en) 2024-11-15 2024-11-15 A parameter transmission method, device, equipment and storage medium based on JSON

Country Status (1)

Country Link
CN (1) CN119473660A (en)

Similar Documents

Publication Publication Date Title
US20200382289A1 (en) Data processing device and data processing method
JP4689945B2 (en) Resource access method
JP4689946B2 (en) A system that executes information processing using secure data
US8353019B2 (en) Security token destined for multiple or group of service providers
US8495383B2 (en) Method for the secure storing of program state data in an electronic device
JPH10171648A (en) Application authenticating device
US11411731B2 (en) Secure API flow
CN110851800B (en) Code protection method, device, system and readable storage medium
JP2018519562A (en) Method and system for transaction security
US12355898B2 (en) System and method for secure Internet communications
US20240193255A1 (en) Systems and methods of protecting secrets in use with containerized applications
KR20130093557A (en) System, devices and methods for collaborative execution of a software application comprising at least one encrypted instruction
CN114697113A (en) Hardware accelerator card-based multi-party privacy calculation method, device and system
US20250167985A1 (en) Method, apparatus, device and medium for processing genetic data
US12355865B2 (en) Hybrid cloud-based security service method and apparatus for security of confidential data
CN110008654B (en) Electronic document processing method and device
CN117354021A (en) Encryption and decryption method, device, equipment, storage medium and product in data transmission
CN119473660A (en) A parameter transmission method, device, equipment and storage medium based on JSON
JP2002247021A (en) Method and apparatus for displaying content with restricted access
US12355746B1 (en) Ephemeral authorization tokens from partner tokens
CN114884710B (en) Page data verification method and device, electronic equipment and storage medium
US12047496B1 (en) Noncustodial techniques for granular encryption and decryption
CN116070250B (en) Password algorithm evaluation method and device for android system application program
CN115996126B (en) Information interaction method, application device, auxiliary platform and electronic device
CN119232478A (en) Data processing method, device and electronic equipment

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