Data writing prompt method, electronic device, device and readable storage medium

By detecting the free storage space of the NFC tag and judging the occupied space of the instructions to be written, the problem of insufficient storage space of the NFC tag is solved, and the prompt operation of adjusting the instructions before writing is realized, improving the writing efficiency and user experience.

CN113849423BActive Publication Date: 2025-08-08GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111178869.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-08
Publication Date
2025-08-08
Estimated Expiration
2041-10-08

AI Technical Summary

Technical Problem

In the prior art, when the instruction data written by the user exceeds the NFC tag storage space, the writing operation is complicated and the user experience is poor.

Method used

By detecting the free storage space of the NFC tag, the space occupied by the instructions to be written is judged, and prompt operations are performed when there is insufficient free storage space, including displaying instructions that cannot be written and recommended alternative instructions, or adjusting the order and content of the instructions to adapt to the storage space.

Benefits of technology

Remind users to adjust instructions before writing operations to avoid repeated operations, which improves the efficiency and user experience of NFC tag writing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113849423B_ABST
    Figure CN113849423B_ABST
Patent Text Reader

Abstract

The present application relates to a proposed data writing prompt method, electronic device, device and readable storage medium. The method includes the following steps: when an NFC tag is detected, obtaining the free storage space of the NFC tag; receiving an NFC instruction to be written to the NFC tag, and determining whether the free storage space is less than the space occupied by the NFC instruction; if the free storage space is less than the space occupied by the NFC instruction, performing an insufficient space prompt operation. By obtaining the free storage space of the NFC tag and monitoring the size relationship between the occupied space of the NFC instruction to be written and the free storage space, it is determined whether the NFC instruction to be written can be written into the NFC tag, and a user is reminded when the NFC instruction to be written cannot be written into the NFC tag, so that the user can adjust and modify the NFC instruction according to the reminder before performing the write operation, without having to repeat the operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular to a data writing prompt method, an electronic device, a device, and a readable storage medium. Background Art

[0002] NFC (Near Field Communication) is a fast, short-range, high-frequency wireless communication technology that operates at a frequency of 13.56 MHz, with a communication connection establishment time of less than 1 second and a communication distance generally limited to less than 10 cm. A bumper sticker is an NFC tag sticker that includes an NFC coil and an NFC chip, and can communicate with NFC devices. The NFC tag stores data pre-written by the NFC device. When the NFC device is close to the NFC tag, the NFC device senses the NFC tag and effectively identifies it, and can convert the working state of the NFC device through the corresponding software; however, due to the limited storage space of the NFC tag, when the instruction data written by the user exceeds the storage space of the NFC tag, it will result in an inability to write, and the user will be required to perform a change operation, which is inconvenient for the user. Summary of the Invention

[0003] The present application provides a data writing prompt method, electronic device, device and readable storage medium, aiming to solve the technical problem in the prior art of complex writing operations on NFC tags when the instruction data written by the user exceeds the storage space of the NFC tag.

[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present application provides a data writing prompt method, which includes the following steps:

[0005] When an NFC tag is detected, obtaining the free storage space of the NFC tag;

[0006] receiving an NFC instruction to be written to the NFC tag, and determining whether the free storage space is less than the space occupied by the NFC instruction;

[0007] If the free storage space is smaller than the space occupied by the NFC instruction, an insufficient space prompt operation is performed.

[0008] Optionally, obtaining the free storage space of the NFC tag includes:

[0009] Obtain the address range where the NFC tag can currently write data;

[0010] The free storage space of the NFC tag is calculated according to the address range.

[0011] Optionally, the determining whether the free storage space is smaller than the space occupied by the NFC instruction includes:

[0012] Sorting the received NFC commands according to corresponding command serial numbers to obtain a command sequence;

[0013] Sequentially combining the first a NFC instructions in the instruction sequence to obtain a number of combination sequences of NFC instructions, where 1≤a≤the number of NFC instructions;

[0014] determining in sequence whether the occupied space of each of the combination sequences is greater than the free storage space;

[0015] If there is a combination sequence whose occupied space is larger than the free storage space, it is determined that the free storage space is smaller than the occupied space of the NFC instruction.

[0016] Optionally, the sequentially determining whether the occupied space of each of the combination sequences is greater than the free storage space includes:

[0017] Increment the counter b by 1, and determine whether the occupied space of the combined sequence including the current b write instructions is larger than the free storage space;

[0018] If the space occupied by the combined sequence including the current b write instructions is less than or equal to the free storage space, then when b is less than the number of the NFC instructions, performing the steps of: incrementing the counter b by 1, and determining whether the combined sequence including the b write instructions can be stored in the free storage space;

[0019] If the space occupied by the combined sequence including the current b write instructions is larger than the free storage space, it is determined that the free storage space cannot store the NFC instruction.

[0020] Optionally, the prompt operation of insufficient execution space includes:

[0021] Classifying the b-th and subsequent NFC instructions in the instruction sequence as first instructions, and classifying the b-th NFC instructions in the instruction sequence as second instructions, wherein the first instructions are instructions that cannot be written into the NFC tag, and the second instructions are instructions that can be written into the NFC tag;

[0022] The first instruction is displayed with a first preset parameter, and the second instruction is displayed with a second preset parameter.

[0023] Optionally, sorting the received NFC instructions according to corresponding instruction serial numbers to obtain an instruction sequence includes:

[0024] Obtaining the reception time or occupied space corresponding to each of the NFC commands;

[0025] Generate a command sequence number corresponding to each NFC according to the receiving time, occupied space or randomly;

[0026] The received NFC instructions are sorted according to the instruction sequence numbers to obtain the instruction sequence.

[0027] Optionally, if the free storage space is smaller than the space occupied by the NFC instruction, the method further includes:

[0028] Obtaining a first instruction and matching a preset instruction library with a recommended instruction that can implement the function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag;

[0029] displaying the recommended instruction at a preset recommended instruction display position corresponding to the first instruction;

[0030] When a selection signal corresponding to the recommended instruction is received, the first instruction is replaced with the recommended instruction.

[0031] To achieve the above object, the present invention further provides an electronic device, comprising:

[0032] A first acquisition module is configured to acquire free storage space of an NFC tag when an NFC tag is detected;

[0033] a first determining module, configured to receive an NFC instruction to be written to the NFC tag, and determine whether the free storage space is smaller than the space occupied by the NFC instruction;

[0034] The first execution module is configured to execute an insufficient space prompt operation if the free storage space is smaller than the space occupied by the NFC instruction.

[0035] Optionally, the first acquisition module includes:

[0036] A first acquiring unit is configured to acquire an address range in which data can currently be written to the NFC tag;

[0037] The first calculation unit is configured to calculate the free storage space of the NFC tag according to the address range.

[0038] Optionally, the first judgment module includes:

[0039] A first execution unit, configured to sort the received NFC instructions according to corresponding instruction serial numbers to obtain an instruction sequence;

[0040] a second execution unit, configured to sequentially combine the first a NFC instructions in the instruction sequence to obtain a number of combination sequences of NFC instructions, where 1≤a≤the number of NFC instructions;

[0041] A first judging unit, configured to judge in sequence whether the occupied space of each of the combination sequences is greater than the free storage space;

[0042] The third execution unit is configured to determine that the free storage space is smaller than the space occupied by the NFC instruction if there is a combination sequence whose occupied space is larger than the free storage space.

[0043] Optionally, the first judging unit includes:

[0044] A first judging subunit is configured to increment the counter b by 1 and judge whether the occupied space of the combined sequence including the current b write instructions is larger than the free storage space;

[0045] a first execution subunit, configured to, if the space occupied by the combined sequence including the current b write instructions is less than or equal to the free storage space, and when b is less than the number of the NFC instructions, perform the steps of: incrementing a counter b by 1, and determining whether the combined sequence including the b write instructions can be stored in the free storage space;

[0046] The second execution subunit is configured to determine that the free storage space cannot store the NFC instruction if the space occupied by the combined sequence including the current b write instructions is larger than the free storage space.

[0047] Optionally, the first execution module includes:

[0048] a fourth execution unit, configured to classify the NFC instructions numbered b and thereafter in the instruction sequence as first instructions, and classify the NFC instructions before the b-th instruction in the instruction sequence as second instructions, wherein the first instructions are instructions that cannot be written into the NFC tag, and the second instructions are instructions that can be written into the NFC tag;

[0049] The first display unit is configured to display the first instruction with a first preset parameter and to display the second instruction with a second preset parameter.

[0050] Optionally, the first judgment module includes:

[0051] A second acquiring unit, configured to acquire a receiving time or an occupied space corresponding to each of the NFC instructions;

[0052] A first generating unit, configured to generate a command sequence number corresponding to each NFC according to the receiving time, the occupied space or randomly;

[0053] The third execution unit is configured to sort the received NFC instructions according to the instruction sequence numbers to obtain the instruction sequence.

[0054] Optionally, if the free storage space is smaller than the space occupied by the NFC instruction, the electronic device further includes:

[0055] a second acquisition module, configured to acquire a first instruction and match a recommended instruction in a preset instruction library that can implement a function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag;

[0056] a first display module, configured to display the recommended instruction at a preset recommended instruction display position corresponding to the first instruction;

[0057] The first receiving module is configured to replace the first instruction with the recommended instruction upon receiving a selection signal corresponding to the recommended instruction.

[0058] To achieve the above-mentioned purpose, the present invention also provides a data writing prompt device, which includes a memory, a processor and a computer program stored in the memory and runnable on the processor. When the computer program is executed by the processor, the steps of the data writing prompt method described above are implemented.

[0059] To achieve the above object, the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the data writing prompt method described above are implemented.

[0060] The present invention proposes a data writing prompt method, electronic device, device, and readable storage medium. When an NFC tag is detected, the method obtains the free storage space of the NFC tag; receives an NFC instruction to be written to the NFC tag, and determines whether the free storage space is less than the space occupied by the NFC instruction; if the free storage space is less than the space occupied by the NFC instruction, a prompt indicating insufficient space is executed. By obtaining the free storage space of the NFC tag and monitoring the size relationship between the occupied space of the NFC instruction to be written and the free storage space, it is determined whether the NFC instruction to be written can be written into the NFC tag. If the NFC instruction to be written cannot be written into the NFC tag, the user is reminded, so that the user can adjust and modify the NFC instruction according to the reminder before executing the write operation, without having to repeat the operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0063] Figure 1 This is a flow chart of a first embodiment of a data writing prompt method according to the present invention;

[0064] Figure 2 This is a schematic diagram of the overall flow of the data writing prompt method of the present invention;

[0065] Figure 3 This is a schematic diagram of the module structure of the data writing prompt device of the present invention. DETAILED DESCRIPTION

[0066] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of this application.

[0067] The present invention provides a data writing prompt method, which is applied to a data writing prompt device, wherein the data writing prompt device is an electronic device supporting NFC communication, such as a mobile phone, a tablet, a wearable device or an audio-visual device; Figure 1 , Figure 1 This is a flow chart of a first embodiment of a data writing prompt method according to the present invention, wherein the method comprises the following steps:

[0068] Step S10: when an NFC tag is detected, obtaining the free storage space of the NFC tag;

[0069] An NFC tag consists of an NFC coil and an NFC chip. The NFC coil is a circular, elliptical, or other arbitrary coil formed by wrapping an NFC antenna around it. It captures electrical energy from the electromagnetic field and uses it to demodulate or modulate the electromagnetic field for transmission and reception of small amounts of data. The NFC chip is a circuit module used to store information. When a data input device is brought close to the NFC tag, the device emits electromagnetic energy to the NFC tag. The NFC coil on the NFC tag couples this electromagnetic energy and transmits it to the NFC chip, which is connected to the NFC coil. The NFC chip, through a rectifier circuit, converts this electromagnetic energy into power for its internal microcontroller, modem, and memory circuits. When the microcontroller, modem, and memory circuits are powered on and begin operating, they can transmit the information stored in the NFC chip to the data input device via the NFC coil. When the NFC coil in the data writing prompt device couples with the NFC coil in the NFC tag, the data writing prompt device detects the NFC tag and determines the tag's available storage space based on the information provided by the NFC tag. It should be noted that the NFC tag's available storage space can be retrieved after the write operation.

[0070] Step S20, receiving an NFC instruction to be written to the NFC tag, and determining whether the free storage space is smaller than the space occupied by the NFC instruction;

[0071] The display interface of the data writing prompt device is provided with a preset input position, such as an input box, in which the user can input the NFC instruction to be written to the NFC tag; it is understandable that the operation of writing the NFC instruction to the NFC tag will not be performed before the write instruction is received. The size of the space required is calculated based on the NFC instruction input by the user, and it is judged in real time whether the free storage space of the NFC tag can store the NFC instruction input by the user. Specifically, an instruction database can be pre-set, and the instruction database contains data information of each NFC instruction. The data information of the NFC instruction contains the length of the NFC instruction. At the same time, the size of the space required to be occupied by the NFC instruction can also be calculated based on the length. When it is necessary to calculate the occupied space of the NFC instruction, the corresponding data information can be directly matched in the instruction database to obtain the occupied space.

[0072] Step S30: If the free storage space is smaller than the space occupied by the NFC instruction, a prompt operation of insufficient space is performed.

[0073] When the free storage space is smaller than the space occupied by the NFC commands, it means that the NFC tag cannot store all the NFC commands entered by the user, so the insufficient space prompt operation is performed;

[0074] When the free storage space is greater than or equal to the space occupied by NFC commands, it indicates that the NFC tag can store all NFC commands entered by the user and does not prompt that there is insufficient space. It is understood that the NFC tag can store all NFC commands entered by the user and can prompt that there is sufficient space. Furthermore, the specific values of the occupied space and free storage space can be displayed at a preset space location, such as occupied space / free storage space: 20b / 1000b. It is understood that the specific prompt form can be set according to the actual application scenario and needs, and will not be detailed here.

[0075] This embodiment obtains the free storage space of the NFC tag and monitors the size relationship between the space occupied by the NFC instruction to be written and the free storage space to determine whether the NFC instruction to be written can be written into the NFC tag, and reminds the user when the NFC instruction to be written cannot be written into the NFC tag, so that the user can adjust and modify the NFC instruction according to the reminder before performing the writing operation, without having to repeat the operation.

[0076] Further, in the subsequent examples, see Figure 2 In the second embodiment of the data writing prompt method of the present invention proposed based on the first embodiment of the present invention, step S10 includes the following steps:

[0077] Step S11, obtaining the address range where the NFC tag can currently write data;

[0078] Step S12: Calculate the free storage space of the NFC tag according to the address range.

[0079] The NFC tag's response contains the address range where data can be written (starting address startAddr, ending address endAddr). The free memory space can be calculated based on the address range. For example, if the address range is [252, 1252], the free memory space is 1252-252 = 1000 bytes.

[0080] It should be noted that the calculation operation of the free storage space can also be directly calculated by the NFC tag, and the NFC tag directly feeds back the free storage space to the data writing prompt device.

[0081] This embodiment can reasonably obtain the free storage space of the NFC tag.

[0082] Furthermore, in a third embodiment of the data writing prompt method of the present invention proposed based on the first embodiment of the present invention, step S20 includes the following steps:

[0083] Step S21, sorting the received NFC instructions according to the corresponding instruction serial numbers to obtain an instruction sequence;

[0084] The step S21 includes:

[0085] Step S211, obtaining the receiving time or occupied space corresponding to each NFC instruction;

[0086] Step S212, generating a command sequence number corresponding to each NFC according to the reception time, the occupied space or randomly;

[0087] Step S213: sort the received NFC instructions according to the instruction sequence numbers to obtain the instruction sequence.

[0088] In this embodiment, the instruction sequence is obtained by sorting the NFC instructions by receiving time, occupied space or randomly, wherein sorting by receiving time can meet the user's usage needs; sorting by occupied space can make it possible to write as many NFC instructions as possible into the NFC tag when there is free storage space that cannot store all NFC instructions. Specifically, when the order requirement or correlation between NFC instructions is small, the NFC instructions can be sorted by space size; when the order requirement or correlation between NFC instructions is large, the NFC instructions can be sorted by receiving time; it is also set according to the actual application scenario and needs, which will not be described in detail here. Step S22, sequentially combine the first a NFC instructions in the instruction sequence to obtain a number of combination sequences of NFC instructions, where 1≤a≤the number of NFC instructions;

[0089] Step S23, determining in sequence whether the occupied space of each combination sequence is greater than the free storage space;

[0090] Step S24: If there is a combination sequence whose occupied space is larger than the free storage space, it is determined that the free storage space is smaller than the occupied space of the NFC instruction.

[0091] The NFC commands input by the user are combined to obtain a combination sequence. Specifically, if the user inputs 4 NFC commands, that is, 1≤a≤4; they are sorted according to the reception time as command 1, command 2, command 3 and command 4 respectively; and four combination sequences are obtained: [command 1]; [command 1; command 2]; [command 1; command 2; command 3]; [command 1; command 2; command 3; command 4].

[0092] The space occupied by each combination sequence is the sum of the space occupied by the instructions it contains; whether the space occupied by each combination sequence is greater than the free storage space is determined in turn; when the space occupied by all combination sequences is less than or equal to the free storage space, it means that the free storage space is greater than or equal to the space occupied by the NFC instructions; it should be noted that it is also possible to determine whether the space occupied by the largest combination sequence is greater than the free storage space to determine whether the free storage space is less than the space occupied by the NFC instructions; when there is a combination sequence whose occupied space is greater than the free storage space, it means that the free storage space of the NFC tag cannot store all NFC instructions.

[0093] This embodiment can reasonably determine whether the free storage space is smaller than the space occupied by the NFC command.

[0094] Furthermore, in a fourth embodiment of the data writing prompt method of the present invention proposed based on the third embodiment of the present invention, step S23 includes the following steps:

[0095] Step S231, incrementing the counter b by 1, and determining whether the occupied space of the combined sequence including the current b write instructions is larger than the free storage space;

[0096] In step S232, if the space occupied by the combined sequence including the current b write instructions is less than or equal to the free storage space, then when b is less than the number of the NFC instructions, executing the following steps: incrementing the counter b by 1, and determining whether the combined sequence including the b write instructions can be stored in the free storage space; when b is greater than or equal to the number of the NFC instructions, the free storage space can store the NFC instructions, and all NFC instructions can be displayed at the preset input position with the first preset parameters.

[0097] Step S233: If the space occupied by the combined sequence including the current b write instructions is larger than the free storage space, it is determined that the free storage space cannot store the NFC instruction.

[0098] It is understandable that the counter will be reset when it is started. The space occupied by each combination sequence, from the smallest to the largest number of NFC instructions, is determined to see if it is greater than the free storage space. If the space occupied by a combination sequence is less than or equal to the free storage space, the next combination sequence is determined. If the space occupied by a combination sequence is greater than the free storage space, it is considered that the current combination sequence and the combination sequence containing more NFC instructions than the current combination sequence cannot be stored in the NFC tag.

[0099] The step S30 includes the following steps:

[0100] Step S31: classify the NFC instructions b and thereafter in the instruction sequence as first instructions, and classify the NFC instructions before b in the instruction sequence as second instructions, wherein the first instructions are instructions that cannot be written into the NFC tag, and the second instructions are instructions that can be written into the NFC tag;

[0101] Step S32: displaying the first instruction with a first preset parameter, and displaying the second instruction with a second preset parameter.

[0102] It can be made clear from the way the combined sequence is generated and whether the occupied space is greater than the free storage space that when it is judged that the occupied space of the combined sequence is greater than the free storage space, it means that the space required to be occupied by the NFC instructions other than the last NFC instruction in the combined sequence is less than or equal to the free storage space. At the same time, since the order of the NFC instructions in the combined sequence is consistent with that in the instruction sequence, the NFC instructions before the bth in the instruction sequence can be classified as instructions that can be written into the NFC tag, and the NFC instructions from the bth onwards in the instruction sequence can be classified as instructions that cannot be written into the NFC tag.

[0103] The first and second preset parameters are used to distinguish the first and second instructions; specific parameters include, but are not limited to, color, size, font, or mark, such as displaying the first instruction in red and the second instruction in green. In other embodiments, a separation process may be performed between the first and second instructions, such as by setting a dividing line between the first and second instructions. It is understood that any method for displaying or distinguishing between two types of objects can be applied to the solution of this embodiment.

[0104] This embodiment can reasonably distinguish between the first instruction and the second instruction, so that the user can clearly understand which instructions exceed the free storage space.

[0105] Furthermore, in a fifth embodiment of the data writing prompt method of the present invention proposed based on the first embodiment of the present invention, if the free storage space is smaller than the space occupied by the NFC instruction, the method further includes the steps of:

[0106] Step S40: Obtain a first instruction, and match a recommended instruction in a preset instruction library that can implement the function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag;

[0107] Step S50, displaying the recommended instruction at a preset recommended instruction display position corresponding to the first instruction;

[0108] Step S60: When a selection signal corresponding to the recommended instruction is received, the first instruction is replaced with the recommended instruction.

[0109] When the free storage space is smaller than the space occupied by the NFC instructions, the NFC instructions contain instructions that cannot be written into the NFC tag, namely, the first instructions. To further improve the user experience, an instruction with the same or similar function as the first instruction can be matched, and the space occupied by the NFC instruction formed after adopting the instruction is less than or equal to the free storage space. That is, while the function of the NFC instruction remains unchanged, an NFC instruction with a smaller space is provided for the user to choose. It is understandable that multiple first instructions can be matched with corresponding recommended instructions at the same time. Furthermore, the second instruction, i.e., the instruction that can be written into the NFC tag, can also be synchronously matched with the corresponding recommended instruction to further reduce the space occupied by the NFC instructions.

[0110] When the user selects a recommended instruction, the recommended instruction replaces its corresponding first instruction.

[0111] This embodiment can provide NFC commands that occupy less space for users to select without changing the functions of the NFC commands.

[0112] It should be noted that for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0113] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0114] The present application also provides an electronic device for implementing the above-mentioned data writing prompt method, the electronic device comprising:

[0115] A first acquisition module is configured to acquire free storage space of an NFC tag when an NFC tag is detected;

[0116] a first determining module, configured to receive an NFC instruction to be written to the NFC tag, and determine whether the free storage space is smaller than the space occupied by the NFC instruction;

[0117] The first execution module is configured to execute an insufficient space prompt operation if the free storage space is smaller than the space occupied by the NFC instruction.

[0118] This electronic device obtains the free storage space of the NFC tag and monitors the size relationship between the space occupied by the NFC instruction to be written and the free storage space to determine whether the NFC instruction to be written can be written into the NFC tag, and reminds the user when the NFC instruction to be written cannot be written into the NFC tag, so that the user can adjust and modify the NFC instruction according to the reminder before performing the writing operation, without having to repeat the operation.

[0119] It should be noted that the first acquisition module in this embodiment can be used to execute step S10 in the embodiment of the present application, the first judgment module in this embodiment can be used to execute step S20 in the embodiment of the present application, and the first execution module in this embodiment can be used to execute step S30 in the embodiment of the present application.

[0120] Furthermore, the first acquisition module includes:

[0121] A first acquiring unit is configured to acquire an address range in which data can currently be written to the NFC tag;

[0122] The first calculation unit is configured to calculate the free storage space of the NFC tag according to the address range.

[0123] Furthermore, the first judgment module includes:

[0124] A first execution unit, configured to sort the received NFC instructions according to corresponding instruction serial numbers to obtain an instruction sequence;

[0125] a second execution unit, configured to sequentially combine the first a NFC instructions in the instruction sequence to obtain a number of combination sequences of NFC instructions, where 1≤a≤the number of NFC instructions;

[0126] A first judging unit, configured to judge in sequence whether the occupied space of each of the combination sequences is greater than the free storage space;

[0127] The third execution unit is configured to determine that the free storage space is smaller than the space occupied by the NFC instruction if there is a combination sequence whose occupied space is larger than the free storage space.

[0128] Furthermore, the first judgment unit includes:

[0129] A first judging subunit is configured to increment the counter b by 1 and judge whether the occupied space of the combined sequence including the current b write instructions is larger than the free storage space;

[0130] a first execution subunit, configured to, if the space occupied by the combined sequence including the current b write instructions is less than or equal to the free storage space, and when b is less than the number of the NFC instructions, perform the steps of: incrementing a counter b by 1, and determining whether the combined sequence including the b write instructions can be stored in the free storage space;

[0131] The second execution subunit is configured to determine that the free storage space cannot store the NFC instruction if the space occupied by the combined sequence including the current b write instructions is larger than the free storage space.

[0132] Furthermore, the first execution module includes:

[0133] a fourth execution unit, configured to classify the NFC instructions numbered b and thereafter in the instruction sequence as first instructions, and classify the NFC instructions before the b-th instruction in the instruction sequence as second instructions, wherein the first instructions are instructions that cannot be written into the NFC tag, and the second instructions are instructions that can be written into the NFC tag;

[0134] The first display unit is configured to display the first instruction with a first preset parameter and to display the second instruction with a second preset parameter.

[0135] Furthermore, the first judgment module includes:

[0136] The second acquisition unit is used to obtain the reception time or occupied space corresponding to each of the NFC instructions; the first generation unit is used to generate the instruction serial number corresponding to each of the NFC instructions according to the reception time, occupied space or randomly;

[0137] The third execution unit is configured to sort the received NFC instructions according to the instruction sequence numbers to obtain the instruction sequence.

[0138] Furthermore, if the free storage space is smaller than the space occupied by the NFC command, the electronic device further includes:

[0139] a second acquisition module, configured to acquire a first instruction and match a recommended instruction in a preset instruction library that can implement a function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag;

[0140] a first display module, configured to display the recommended instruction at a preset recommended instruction display position corresponding to the first instruction;

[0141] The first receiving module is configured to replace the first instruction with the recommended instruction upon receiving a selection signal corresponding to the recommended instruction.

[0142] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be implemented by software or hardware, wherein the hardware environment includes a network environment.

[0143] Reference Figure 3 In terms of hardware structure, the data writing prompt device may include components such as a communication module 10, a memory 20, and a processor 30. In the data writing prompt device, the processor 30 is connected to the memory 20 and the communication module 10, respectively. The memory 20 stores a computer program, which is simultaneously executed by the processor 30. When the computer program is executed, the steps of the above-mentioned method embodiment are implemented.

[0144] The communication module 10 can be connected to an external communication device via a network. The communication module 10 can receive requests from the external communication device and can also send requests, instructions, and information to the external communication device. The external communication device can be other data writing prompt devices, servers, or Internet of Things devices such as televisions.

[0145] Memory 20 can be used to store software programs and various data. Memory 20 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as obtaining the address range where the NFC tag can currently write data). The data storage area may include a database and may store data or information created based on system usage. Furthermore, memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0146] The processor 30 serves as the control center of the data writing prompt device. It connects the various components of the device using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 20 and accessing data stored in the memory 20, it performs various functions of the device and processes data, thereby providing overall monitoring of the device. The processor 30 may include one or more processing units; optionally, the processor 30 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 30.

[0147] although Figure 3 Although not shown, the data writing prompt device may further include a circuit control module, which is used to connect to the power supply to ensure the normal operation of other components. Figure 3 The structure of the data writing prompt device shown in the figure does not constitute a limitation to the data writing prompt device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0148] The present invention also provides a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be Figure 3 The memory 20 in the data writing prompt device may also be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk. The computer-readable storage medium includes a number of instructions for enabling a terminal device with a processor (which may be a television, a car, a mobile phone, a computer, a server, a terminal, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0149] In the present invention, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0150] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and features of different embodiments or examples without contradiction.

[0151] Although the embodiments of the present invention have been shown and described above, the scope of protection of the present invention is not limited thereto. It should be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Persons skilled in the art may make changes, modifications, and substitutions to the above embodiments within the scope of the present invention, and such changes, modifications, and substitutions should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.

Claims

1. A data writing prompt method, characterized in that: The method comprises: When an NFC tag is detected, obtaining the free storage space of the NFC tag; receiving an NFC instruction to be written to the NFC tag, and determining whether the free storage space is less than the space occupied by the NFC instruction; If the free storage space is smaller than the space occupied by the NFC instruction, an insufficient space prompt operation is performed; Obtaining a first instruction and matching a preset instruction library with a recommended instruction that can implement the function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag; displaying the recommended instruction at a preset recommended instruction display position corresponding to the first instruction; When a selection signal corresponding to the recommended instruction is received, the first instruction is replaced with the recommended instruction.

2. The data writing prompt method according to claim 1, wherein: The acquiring of the free storage space of the NFC tag includes: Obtain the address range where data can currently be written to the NFC tag; The free storage space of the NFC tag is calculated according to the address range.

3. The data writing prompt method according to claim 1, wherein: The determining whether the free storage space is smaller than the space occupied by the NFC instruction includes: When there are multiple NFC instructions, sort the received NFC instructions according to corresponding instruction serial numbers to obtain an instruction sequence; Sequentially combining the first a NFC instructions in the instruction sequence to obtain a number of combination sequences of NFC instructions, where 1≤a≤the number of NFC instructions; determining in sequence whether the occupied space of each of the combination sequences is greater than the free storage space; If there is a combination sequence whose occupied space is larger than the free storage space, it is determined that the free storage space is smaller than the occupied space of the NFC instruction.

4. The data writing prompt method according to claim 3, wherein: The step of sequentially determining whether the occupied space of each of the combination sequences is greater than the free storage space includes: Increment the counter b by 1, and determine whether the occupied space of the combined sequence including the current b write instructions is larger than the free storage space; If the space occupied by the combined sequence including the current b write instructions is less than or equal to the free storage space, then when b is less than the number of the NFC instructions, performing the steps of: incrementing the counter b by 1, and determining whether the combined sequence including the b write instructions can be stored in the free storage space; If the space occupied by the combined sequence including the current b write instructions is larger than the free storage space, it is determined that the free storage space cannot store the NFC instruction.

5. The data writing prompt method according to claim 4, wherein: The prompt operation of insufficient execution space includes: Classifying the b-th and subsequent NFC instructions in the instruction sequence as first instructions, and classifying the b-th NFC instructions in the instruction sequence as second instructions, wherein the first instructions are instructions that cannot be written into the NFC tag, and the second instructions are instructions that can be written into the NFC tag; The first instruction is displayed with a first preset parameter, and the second instruction is displayed with a second preset parameter.

6. The data writing prompt method according to claim 3, wherein: The step of sorting the received NFC instructions according to corresponding instruction serial numbers to obtain an instruction sequence includes: Obtaining the reception time or occupied space corresponding to each of the NFC commands; Generate a command sequence number corresponding to each NFC according to the receiving time, occupied space or randomly; The received NFC instructions are sorted according to the instruction sequence numbers to obtain the instruction sequence.

7. An electronic device, characterized in that: The electronic device comprises: A first acquisition module is configured to acquire free storage space of an NFC tag when an NFC tag is detected; a first determining module, configured to receive an NFC instruction to be written to the NFC tag, and determine whether the free storage space is smaller than the space occupied by the NFC instruction; A first execution module, configured to execute an insufficient space prompt operation if the free storage space is smaller than the space occupied by the NFC instruction; a second acquisition module, configured to acquire a first instruction and match a recommended instruction in a preset instruction library that can implement a function of the first instruction and whose space occupied by the NFC instruction is less than or equal to the free storage space, wherein the first instruction is an instruction that cannot be written into the NFC tag; a first display module, configured to display the recommended instruction at a preset recommended instruction display position corresponding to the first instruction; The first receiving module is configured to replace the first instruction with the recommended instruction upon receiving a selection signal corresponding to the recommended instruction.

8. A data writing prompting device, characterized in that: The data writing prompt device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the data writing prompt method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the data writing prompt method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Routing processing method and device, storage medium and electronic equipment

    CN110191054A