Advertisement link parameter dynamic encryption method, terminal equipment and storage medium
By collecting dynamic user characteristics to generate exclusive encryption factors and keys for each ad push, and encrypting the ad parameters with AES, the problem of insufficient security of ad link parameter encryption in existing technologies is solved. This achieves real-time and independent encryption of ad links, thereby improving information security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for encrypting ad link parameters have low security. Once the ciphertext is cracked, the ad parameters can be determined using the same ad link, resulting in insufficient information security.
Each time an ad is pushed to a target user, dynamic user characteristics are collected, a unique encryption factor is generated through weighted calculation, a unique key is generated to encrypt the ad parameters with AES, and the unique ciphertext is concatenated with the ad link.
It achieves real-time and independent encryption of ciphertext for each ad push, and even if the ciphertext is cracked in individual cases, it will not affect the security of subsequent ad links, thus improving information security.
Smart Images

Figure CN121664455A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of computer science, and in particular relates to a method for dynamically encrypting advertising link parameters, a terminal device, and a storage medium. Background Technology
[0002] Advertising platforms need to add specific advertising parameters (such as ad ID, user ID, target device information, etc.) to each ad link in order to achieve precise ad targeting and performance tracking; To ensure the security of advertising parameters, the advertising parameters that are adjusted to the advertising link need to be encrypted. Existing encryption methods directly generate fixed ciphertext based on the advertising parameters and then concatenate the fixed ciphertext to the advertising link. Once the ciphertext is cracked, the advertising parameters can be directly determined by sending the same advertising link with the same ciphertext, which has low security. Summary of the Invention
[0003] In view of this, embodiments of this application provide a method for dynamically encrypting advertising link parameters, a terminal device, and a storage medium, which can solve the above-mentioned technical problems.
[0004] A first aspect of this application provides a method for dynamically encrypting advertising link parameters, the method comprising: S1: Obtain the ad link and corresponding ad parameters each time an ad needs to be pushed to the target user; S2: Collect dynamic user characteristics of the target user; S3: Perform weighted calculations on dynamic user features based on preset weights to obtain a unique encryption factor corresponding to each dynamic user feature. S4: Generate a unique key based on the unique encryption factor; S5: Use a dedicated key to encrypt the advertising parameters with AES, thereby obtaining a unique ciphertext that corresponds to the dynamic user characteristics. S6: Combines the proprietary encrypted text with the advertising link.
[0005] A second aspect of this application provides a terminal device, including a memory and a processor. The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the dynamic encryption method for advertising link parameters.
[0006] A third aspect of this application provides a storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the dynamic encryption method for advertising link parameters.
[0007] The beneficial effects of this application embodiment compared with the prior art are as follows: The method provided by the present invention includes obtaining the advertisement link and corresponding advertisement parameters each time an advertisement needs to be pushed to a target user; collecting the dynamic user characteristics of the target user; performing weighted calculation on the dynamic user characteristics according to preset weights to obtain a unique encryption factor corresponding to the dynamic user characteristics; generating a unique key based on the unique encryption factor; encrypting the advertisement parameters with the unique key using AES to obtain a unique ciphertext corresponding to the dynamic user characteristics; and concatenating the unique ciphertext with the advertisement link. In this application, it is possible to collect the user's dynamic user characteristics in real time and generate a unique ciphertext corresponding to the dynamic user characteristics to encrypt the advertisement link. That is, it is possible to ensure that the encrypted ciphertext used for the advertisement link sent each time an advertisement is pushed to the same user is different. Even if the encrypted ciphertext is cracked in individual cases, the advertisement link sent each time is real-time and independent, and the subsequent advertisement links will not be cracked because one advertisement link is cracked, thus improving information security. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a schematic diagram illustrating the implementation process of the dynamic encryption method for advertising link parameters provided in this application embodiment; Figure 2 This is a schematic diagram of the implementation environment of the dynamic encryption method for advertising link parameters provided in the embodiments of this application; Figure 3 This is a schematic diagram of the terminal device provided in the embodiments of this application. Detailed Implementation
[0010] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0011] To illustrate the technical solution described in this application, specific embodiments are provided below.
[0012] Figure 1This application illustrates a method for dynamically encrypting advertising link parameters according to Embodiment 1. The method includes: S1: Obtain the ad link and corresponding ad parameters each time an ad needs to be pushed to the target user; S2: Collect dynamic user characteristics of the target user; S3: Perform weighted calculations on dynamic user features based on preset weights to obtain a unique encryption factor corresponding to each dynamic user feature. S4: Generate a unique key based on the unique encryption factor; S5: Use a dedicated key to encrypt the advertising parameters with AES, thereby obtaining a unique ciphertext that corresponds to the dynamic user characteristics. S6: Combines the proprietary encrypted text with the advertising link.
[0013] In this embodiment, as Figure 2 As shown, this method is executed in a terminal device, which can be an independent physical server or terminal, or a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud servers, cloud databases, cloud storage and CDN. The terminal device can communicate with the user's client (such as a mobile phone, tablet computer, laptop computer, etc.), thereby collecting the user's dynamic user characteristics and using them to encrypt the advertising link, thereby pushing the encrypted advertising link to the user.
[0014] In this embodiment, the terminal device can be a terminal device of the operator platform, and the target user is a user who has registered on the operator platform. This method can be executed separately for each target user to ensure information security when pushing advertisements to them. After the user logs into the operator platform's website through the user terminal, the corresponding terminal device can encrypt the advertisement link according to this method, and then push advertisements to the user using the encrypted advertisement link. When the target user logs into the operator platform's website for the first time, the website will generate an authorization letter, which includes the execution steps of this method and the user data to be collected. After the target user agrees to the authorization letter, the terminal device can execute this method for the target user every time they log into the operator platform's website. In this embodiment, dynamic user characteristics refer to the non-fixed user characteristics of a user each time they log in to the website, such as device model (different devices may be used for each login, such as logging in with a mobile phone last time and logging in with a computer this time), login time, geographical location, etc.; encryption factor is the source data for generating the key, exclusive encryption factor is the encryption factor that uniquely corresponds to the dynamic user characteristics, exclusive key is the key that uniquely corresponds to the exclusive encryption factor, and exclusive ciphertext is the unique corresponding ciphertext obtained by encrypting the advertising parameters with the exclusive key. Therefore, the exclusive ciphertext uniquely corresponds to the dynamic user characteristics. Each time the target user logs in, an exclusive ciphertext can be generated to encrypt the advertising link; after the advertising link is encrypted, it can be sent to the user's terminal. This application enables real-time collection of dynamic user characteristics, generating unique ciphertext corresponding to these characteristics to encrypt advertising links. This ensures that the encrypted ciphertext used for each advertising push to the same user is different. Even if the encrypted ciphertext is cracked in some cases, each sent advertising link is real-time and independent, preventing the cracking of one advertising link from leading to the cracking of other advertising links, thus improving information security.
[0015] In a preferred embodiment, the dynamic user features include n sub-features, each with a different feature type; a weight is preset for each feature type. The proprietary encryption factor is represented by the following formula: Encryption factor = (C1*W1 + C2*W2 + ... + C i *W i +…+C n *W n ) Among them, C i For the i-th sub-feature, W i is the weight corresponding to the feature type of the i-th sub-feature, and n is the number of sub-features.
[0016] The generation of a unique key based on a unique encryption factor includes: The encryption factor is hashed to obtain its hash value. Obtain the preset fixed key; The fixed key is concatenated with the hash value of the encryption factor to obtain the unique key; The exclusive key is represented as: Exclusive Key = Fixed Key + Encryption Factor Hash Value.
[0017] In this embodiment, dynamic user characteristics may include several different types of sub-characteristics, such as device model, login time, and geographical location. Each type of sub-characteristic has a preset weight. For example, the weight of the device model sub-characteristic is 0.3, the weight of the login time sub-characteristic is 0.4, and the weight of the geographical location sub-characteristic is 0.5. In this embodiment, an example is given. The fixed key is a preset string, such as AESKey123456. The encryption factor hash value is the string obtained by processing the encryption factor using a hash algorithm, such as 5d41402abc4b2a76b9719d911017c592. Finally, the exclusive key AESKey123456+5d41402abc4b2a76b9719d911017c592 can be obtained.
[0018] In a preferred embodiment, the advertising parameters include user parameters and business parameters; the advertising parameters are encrypted with AES using a dedicated key to obtain a unique ciphertext that uniquely corresponds to the dynamic user characteristics, including: Convert business parameters into the first JSON parameter. The first JSON parameter is encrypted with AES using a dedicated key to obtain the first ciphertext. Convert user parameters into a second JSON parameter. The second JSON parameter is encrypted with AES using a dedicated key to obtain the second ciphertext. Combine the first ciphertext and the second ciphertext into a unique ciphertext; Generate tracking tags and embed them into proprietary encrypted text.
[0019] In this embodiment, business parameters refer to parameters used in the business system to process and identify various business logics. These parameters are widely used within the system to ensure that the system can correctly execute and manage various business processes. Business parameters typically appear in the form of unique identifiers (such as IDs) that can uniquely identify a specific business entity (such as a user, order, product, etc.). User parameters can be various information actively provided by the user when browsing and using the landing page; this information typically includes name, mobile phone number, email address, etc. These parameters are mainly used to automatically display the entered information when the user navigates to the next page, thereby improving the user experience and reducing the hassle of repetitive input.
[0020] In this embodiment, packaging the parameters into JSON objects makes the data organization clear and structured, facilitates cross-language transmission and interaction, improves the efficiency and flexibility of front-end and back-end development, and also facilitates configuration management and dynamic updates, making data processing more efficient, flexible and easy to manage.
[0021] In this embodiment, the first JSON parameter and the second JSON parameter are encrypted using the AES encryption algorithm and a dedicated key. Since the dedicated key is unique, the first ciphertext and the second ciphertext are both unique, which in turn makes the dedicated ciphertext unique as well.
[0022] As a preferred embodiment, generating tracking tags, after generating proprietary ciphertext, further includes: The collected dynamic user features are aggregated to obtain a dynamic user feature set; The dynamic user feature set is converted into characters to obtain tracking tags; Select the embedding location in the dedicated ciphertext and generate an embedding location indicator; The tracking tag is embedded in the embedding location of the dedicated ciphertext, and the location indicator is appended to the end of the dedicated ciphertext.
[0023] In this embodiment, characterization of the dynamic user feature set can be achieved through hashing. The indicator can be the character position sequence number of the embedded proprietary ciphertext. For example, if the tracking tag is embedded in the 8th character position of the proprietary ciphertext, the indicator can be determined as 8. Alternatively, it can be a pre-set mapping symbol for 8 (a corresponding mapping symbol can be pre-set for each number from 0 to 9, such as E for 8). After receiving the encrypted advertising link, the user can find the tracking tag based on the indicator, thereby verifying the tracking tag to determine whether the received advertising link corresponds to its target user. As a preferred embodiment, the second JSON parameter is encrypted with AES using a dedicated key, and the resulting second ciphertext further includes: Get the preset valid duration; Add the current time to the valid duration to get the expiration time; An expiration date is added to the second ciphertext based on the expiration time.
[0024] In this embodiment, the validity period can be 1 hour or other durations. For example, if the current time is 8 o'clock, the expiration time is 9 o'clock, and the added validity period is 8-9 o'clock. In this embodiment, JWT can be used to set the validity period. Before decrypting the advertising link, it is necessary to verify whether the current time has exceeded the validity period. If so, the advertising link is invalid, and the terminal device needs to be notified to regenerate and send a new advertising link.
[0025] Embodiment 2 of this application provides a terminal device, including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, it causes the processor to perform the steps of the dynamic encryption method for advertising link parameters, specifically including: S1: Obtain the ad link and corresponding ad parameters each time an ad needs to be pushed to the target user; S2: Collect dynamic user characteristics of the target user; S3: Perform weighted calculations on dynamic user features based on preset weights to obtain a unique encryption factor corresponding to each dynamic user feature. S4: Generate a unique key based on the unique encryption factor; S5: Use a dedicated key to encrypt the advertising parameters with AES, thereby obtaining a unique ciphertext that corresponds to the dynamic user characteristics. S6: Combines the proprietary encrypted text with the advertising link.
[0026] Embodiment 3 of this application provides a storage medium storing a computer program. When the computer program is executed by a processor, the processor performs the steps of the dynamic encryption method for advertising link parameters, specifically including: S1: Obtain the ad link and corresponding ad parameters each time an ad needs to be pushed to the target user; S2: Collect dynamic user characteristics of the target user; S3: Perform weighted calculations on dynamic user features based on preset weights to obtain a unique encryption factor corresponding to each dynamic user feature. S4: Generate a unique key based on the unique encryption factor; S5: Use a dedicated key to encrypt the advertising parameters with AES, thereby obtaining a unique ciphertext that corresponds to the dynamic user characteristics. S6: Combines the proprietary encrypted text with the advertising link.
[0027] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0028] It should be understood that, when used in this application specification, the term "comprising" indicates the presence of the described feature, integral, step, operation, element, and / or component, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof.
[0029] It should also be understood that the term “and / or” as used in this application specification means any combination of one or more of the associated listed items, as well as all possible combinations, and includes such combinations.
[0030] As used in this application specification, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [the described condition or event] is detected," or "in response to detection of [the described condition or event]."
[0031] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance. It should also be understood that although the terms "first," "second," etc., are used in the text to describe various elements in some embodiments of this application, these elements should not be limited by these terms. These terms are merely used to distinguish one element from another. For example, a first table may be named a second table, and similarly, a second table may be named a first table, without departing from the scope of the various described embodiments. Both the first table and the second table are tables, but they are not the same table.
[0032] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0033] The dynamic encryption method for advertising link parameters provided in this application embodiment can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application embodiment does not impose any restrictions on the specific type of terminal device.
[0034] For example, the terminal device may be a station (STAION, ST) in a WLAN, a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a vehicle networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite wireless device, a wireless modem card, a set-top box (STB), customer premises equipment (CPE), and / or other devices used for communication over a wireless system, as well as next-generation communication systems, such as mobile terminals in 5G networks or mobile terminals in future evolved Public Land Mobile Network (PLMN) networks.
[0035] As an example and not a limitation, when the terminal device is a wearable device, the term "wearable device" can also refer to any device that utilizes wearable technology to intelligently design and develop everyday wearables, such as glasses, gloves, watches, clothing, and shoes. Wearable devices are portable devices worn directly on the body or integrated into a user's clothing or accessories. Wearable devices are not merely hardware devices; they achieve powerful functions through software support, data interaction, and cloud interaction. Broadly defined, wearable smart devices include those with comprehensive functions, large sizes, and the ability to perform complete or partial functions without relying on a smartphone, such as smartwatches or smart glasses, as well as those focused on a specific application function that require interaction with other devices such as smartphones, such as various smart bracelets and smart jewelry for vital sign monitoring.
[0036] Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. For example... Figure 3 As shown, the terminal device of this embodiment includes: at least one processor ( Figure 3 Only one is shown in the image, and a memory is stored in the memory, which contains a computer program that can run on the processor. When the processor executes the computer program, it implements the steps in the above embodiments of the dynamic encryption method for advertising link parameters, for example... Figure 1 Steps S1 to S6 are shown.
[0037] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that... Figure 3 This is merely an example of a terminal device and does not constitute a limitation on the terminal device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the terminal device may also include input transmitting devices, network access devices, buses, etc.
[0038] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0039] In some embodiments, the memory may be an internal storage unit of the terminal device, such as a hard drive or RAM. The memory may also be an external storage device of the terminal device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory may include both internal and external storage units. The memory is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory can also be used to temporarily store data that has been sent or will be sent.
[0040] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0041] This application provides a computer program product that, when run on a mobile terminal device, enables the mobile terminal device to implement the steps described in the above-described method embodiments.
[0042] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0043] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0044] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0045] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0046] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for dynamically encrypting advertising link parameters, characterized in that, The method for dynamically encrypting the ad link parameters includes: S1: Obtain the ad link and corresponding ad parameters each time an ad needs to be pushed to the target user; S2: Collect dynamic user characteristics of the target user; S3: Perform weighted calculations on dynamic user features based on preset weights to obtain a unique encryption factor corresponding to each dynamic user feature. S4: Generate a unique key based on the unique encryption factor; S5: Use a dedicated key to encrypt the advertising parameters with AES, thereby obtaining a unique ciphertext that corresponds to the dynamic user characteristics. S6: Combines the proprietary encrypted text with the advertising link.
2. The method according to claim 1, characterized in that, Dynamic user features include n sub-features, each with a different feature type; a weight is preset for each feature type. The proprietary encryption factor is represented by the following formula: Encryption factor = (C1*W1 + C2*W2 + ... + C i *W i +…+C n *W n ) Among them, C i For the i-th sub-feature, W i is the weight corresponding to the feature type of the i-th sub-feature, and n is the number of sub-features.
3. The method according to claim 2, characterized in that, The generation of a unique key based on a unique encryption factor includes: The encryption factor is hashed to obtain its hash value. Obtain the preset fixed key; The fixed key is concatenated with the hash value of the encryption factor to obtain the unique key; The exclusive key is represented as: Exclusive Key = Fixed Key + Encryption Factor Hash Value.
4. The method according to claim 1, characterized in that, Advertising parameters include user parameters and business parameters; these parameters are encrypted using AES with a dedicated key to obtain unique ciphertext that corresponds to the dynamic user characteristics, including: Convert business parameters into the first JSON parameter. The first JSON parameter is encrypted with AES using a dedicated key to obtain the first ciphertext. Convert user parameters into a second JSON parameter. The second JSON parameter is encrypted with AES using a dedicated key to obtain the second ciphertext. Combine the first ciphertext and the second ciphertext into a unique ciphertext; Generate tracking tags and embed them into proprietary encrypted text.
5. The method according to claim 4, characterized in that, After generating the proprietary ciphertext, the following steps are also included in generating tracking tags: The collected dynamic user features are aggregated to obtain a dynamic user feature set; The dynamic user feature set is converted into characters to obtain tracking tags; Select the embedding location in the dedicated ciphertext and generate an embedding location indicator; The tracking tag is embedded in the embedding location of the dedicated ciphertext, and the location indicator is appended to the end of the dedicated ciphertext.
6. The method according to claim 5, characterized in that, The second JSON parameter is encrypted using AES with a dedicated key, resulting in the second ciphertext, which also includes: Get the preset valid duration; Add the current time to the valid duration to get the expiration time; An expiration date is added to the second ciphertext based on the expiration time.
7. A terminal device, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the dynamic encryption method for advertising link parameters as described in any one of claims 1 to 6.
8. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the steps of the dynamic encryption method for advertising link parameters as described in any one of claims 1 to 6.