CN114239785A - Instruction writing method and device, storage medium and electronic device - Google Patents

Instruction writing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN114239785A
CN114239785A CN202111566420.2A CN202111566420A CN114239785A CN 114239785 A CN114239785 A CN 114239785A CN 202111566420 A CN202111566420 A CN 202111566420A CN 114239785 A CN114239785 A CN 114239785A
Authority
CN
China
Prior art keywords
nfc tag
instruction set
nfc
storage space
instruction
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.)
Withdrawn
Application number
CN202111566420.2A
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.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun 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 Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202111566420.2A priority Critical patent/CN114239785A/en
Publication of CN114239785A publication Critical patent/CN114239785A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/0722Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips comprising an arrangement for testing the record carrier
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/0723Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips the record carrier comprising an arrangement for non-contact communication, e.g. wireless communication circuits on transponder cards, non-contact smart cards or RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/073Special arrangements for circuits, e.g. for protecting identification code in memory
    • G06K19/07309Means for preventing undesired reading or writing from or onto record carriers

Abstract

The application discloses a method and a device for writing instructions, a storage medium and an electronic device. Wherein, the method comprises the following steps: acquiring an available storage space of the NFC tag under the condition that a first instruction set needs to be written into the NFC tag; under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instruction in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; the first set of instructions is written to the NFC tag. The method and the device solve the technical problem that the instruction cannot be written in the related technology.

Description

Instruction writing method and device, storage medium and electronic device
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for writing an instruction, a storage medium, and an electronic apparatus.
Background
Near Field Communication (NFC) is a fast short-distance high-frequency wireless Communication technology that operates on a frequency of 13.56MHz (megahertz), has a Communication connection establishment time of less than 1 second, and has a Communication distance generally limited to 10 centimeters.
Bump and paste is a NFC label sticker, including NFC coil, NFC chip, can carry out the communication with NFC equipment. The NFC coil is a coil which is formed by surrounding an NFC antenna into a circle or an ellipse or any other shape and is used for capturing electric energy from an electromagnetic field and carrying out transceiving communication with smaller data volume by demodulating or modulating the electromagnetic field. And the NFC chip is used for storing the chip of the circuit module of the information. The NFC device may be an NFC reader or an electronic device supporting NFC communication, such as a mobile phone supporting NFC communication. When NFC equipment is close to the NFC label, the NFC equipment sends out electromagnetic energy to the NFC label, and the NFC coil on the NFC label couples this electromagnetic energy and passes it to the NFC chip that links to each other with the NFC coil in, and the NFC chip passes through rectifier circuit and converts this electromagnetic energy into the required power of circuits such as its inside microcontroller, modem and memory. When the circuits such as the microcontroller, the modem, and the memory start to operate after power-on, information stored in the NFC chip can be transmitted to the NFC device through the NFC coil.
In the process of writing data into the NFC tag, a user needs to input an instruction into the NFC device, the NFC device stores the input instruction as data to be written and writes the data into the NFC tag, and due to the fact that the data volume which can be stored by the NFC chip of the NFC tag is limited, the data volume of the instruction input by the user may exceed the capacity of a storage unit of the NFC chip, and writing cannot be conducted.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for writing instructions, a storage medium and an electronic device, so as to at least solve the technical problem that the instructions cannot be written in the related technology.
According to an aspect of an embodiment of the present application, there is provided a method for writing an instruction, including: acquiring an available storage space of the NFC tag under the condition that a first instruction set needs to be written into the NFC tag; under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instruction in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; the first set of instructions is written to the NFC tag.
Optionally, adjusting the instruction in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set includes: deleting the second instruction set in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set; and under the condition that a space exists between the instructions in the NFC tag, adjusting the storage position of the instructions in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set.
Optionally, deleting the second instruction set in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set, including: acquiring the writing time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the writing time, wherein the instruction set with the early writing time is positioned in front of the instruction set with the late writing time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, deleting the second instruction set in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set, including: acquiring the latest use time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the use time, wherein the instruction set with the early use time is positioned before the instruction set with the late use time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, deleting the second instruction set in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set, including: acquiring a storage space occupied by each instruction set in the NFC label; determining a second instruction set in the NFC label according to the occupied storage space, wherein the sum of the storage space occupied by the second instruction set and the available storage space of the NFC label is not less than the storage space required by the first instruction set; deleting the second instruction set in the NFC tag.
Optionally, deleting the second instruction set in the NFC tag includes: displaying an instruction set in the NFC label on the intelligent terminal; detecting a selection operation on the intelligent terminal, wherein the selection operation is used for selecting a second instruction set in the displayed instruction set; deleting the second instruction set in the NFC tag.
Optionally, obtaining the available storage space of the NFC tag includes: acquiring an available address interval of the NFC label; and determining the available storage space of the NFC tag according to the available address interval.
According to another aspect of the embodiments of the present application, there is also provided an instruction writing apparatus, including: the NFC tag comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring the available storage space of the NFC tag under the condition that a first instruction set needs to be written into the NFC tag; the adjusting unit is used for adjusting the instruction in the NFC tag under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; and the writing unit is used for writing the first instruction set into the NFC tag.
Optionally, the adjusting unit is further configured to: deleting the second instruction set in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set; and under the condition that a space exists between the instructions in the NFC tag, adjusting the storage position of the instructions in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set.
Optionally, the adjusting unit is further configured to: acquiring the writing time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the writing time, wherein the instruction set with the early writing time is positioned in front of the instruction set with the late writing time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: acquiring the latest use time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the use time, wherein the instruction set with the early use time is positioned before the instruction set with the late use time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: acquiring a storage space occupied by each instruction set in the NFC label; determining a second instruction set in the NFC label according to the occupied storage space, wherein the sum of the storage space occupied by the second instruction set and the available storage space of the NFC label is not less than the storage space required by the first instruction set; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: displaying an instruction set in the NFC label on the intelligent terminal; detecting a selection operation on the intelligent terminal, wherein the selection operation is used for selecting a second instruction set in the displayed instruction set; deleting the second instruction set in the NFC tag.
Optionally, the obtaining unit is further configured to: acquiring an available address interval of the NFC label; and determining the available storage space of the NFC tag according to the available address interval.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program which, when executed, performs the above-described method.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of any of the embodiments of the method described above.
In the embodiment of the application, under the condition that a first instruction set needs to be written into an NFC tag, an available storage space of the NFC tag is obtained; under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instruction in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; the first instruction set is written into the NFC tag, so that the technical problem that instructions cannot be written in the related technology can be solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of an alternative method of writing instructions according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative instruction writing apparatus according to an embodiment of the present application; and the number of the first and second groups,
fig. 3 is a block diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The NFC label stores a plurality of instructions after being used for a long time, and a user often only needs to use the latest written instruction, but the NFC label has too many instructions, so that the NFC label is not easy to inquire and execute, and the problem of writing failure due to the fact that the number of the instructions exceeds the storage amount is easy to occur. To address this problem, according to an aspect of embodiments of the present application, a method embodiment of a method for writing an instruction is provided. The instruction writing method according to the embodiment of the present application may be executed by an intelligent terminal, and the instruction writing method according to the embodiment of the present application executed by the intelligent terminal may also be executed by a client installed thereon. Fig. 1 is a flowchart of an optional instruction writing method according to an embodiment of the present application, and as shown in fig. 1, the method may include the following steps:
step S12, in a case that a first instruction set needs to be written into the NFC tag, the smart terminal obtains an available storage space of the NFC tag, where the first instruction set includes instructions required by the first operation, and the number of the instructions is one or more.
The NFC label can store instruction sets written in advance by a mobile phone (with an NFC function), each instruction set can correspond to one operation or function, when the mobile phone with the NFC function is close to the NFC label, the mobile phone senses the NFC label and effectively recognizes the NFC label, corresponding operations can be executed, if navigation is automatically opened, a conference mode is automatically entered, a designated Wifi hotspot is automatically connected, music is automatically listened to, a Wifi signal is automatically closed, a flight mode is automatically entered, and the like.
Optionally, an available address interval of the NFC tag may be acquired first; and determining the available storage space of the NFC tag according to the available address interval, for example, subtracting the lower limit of the interval from the upper limit of the interval to obtain the storage space.
Step S14, when the available memory space of the NFC tag is smaller than the memory space required by the first instruction set, the smart terminal adjusts the instruction in the NFC tag so that the available memory space of the NFC tag is not smaller than the memory space required by the first instruction set.
Adjusting the instruction in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set, mainly including the following two implementation manners:
one is that the second instruction set in the NFC tag is deleted, so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set;
1) deleting the instruction of the function with early writing time, and acquiring the writing time of each instruction set (equivalent to the instruction of one function) in the NFC tag; sequencing the instruction sets in the NFC tag according to the writing time, wherein the instruction set with the early writing time is positioned in front of the instruction set with the late writing time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag, and if the space is still insufficient after one instruction set is deleted, repeating the operation;
2) deleting the instruction of the function which is not used for a long time, and acquiring the latest service time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the use time, wherein the instruction set with the early use time is positioned before the instruction set with the late use time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; and deleting the second instruction set in the NFC tag, and if the space is still insufficient after one instruction set is deleted, repeating the operation.
3) Acquiring a storage space occupied by each instruction set in the NFC label according to the instruction of the adaptive function in the required space; determining a second instruction set in the NFC label according to the occupied storage space, wherein the sum of the storage space occupied by the second instruction set and the available storage space of the NFC label is not less than the storage space required by the first instruction set; deleting the second instruction set in the NFC tag.
4) Deleting a second set of instructions in the NFC tag, comprising: displaying an instruction set in the NFC label on the intelligent terminal; detecting a selection operation on the intelligent terminal, wherein the selection operation is used for selecting a second instruction set in the displayed instruction set; and deleting the second instruction set in the NFC tag, and if the space is still insufficient after one instruction set is deleted, repeating the operation.
Secondly, under the condition that a space exists between the instructions in the NFC tag, the storage position of the instructions in the NFC tag is adjusted, so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set.
When writing the instruction set, it is generally written sequentially after the last instruction set (i.e. the instruction set with the latest writing time), but during the use process, the user may delete part of the instruction set in the middle of the queue, so at this time, the subsequent instruction sets of the deleted instruction set may be sequentially moved forward to achieve the purpose of increasing the available storage space.
Step S16, write the first instruction set to the NFC tag.
Through the steps, under the condition that a first instruction set needs to be written into the NFC tag, the available storage space of the NFC tag is obtained; under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instruction in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; the first instruction set is written into the NFC tag, so that the technical problem that instructions cannot be written in the related technology can be solved.
When the NFC label writes data, the written data volume is limited, and when the written content exceeds the data volume which can be stored by the bump sticker, the data instruction cannot be written. In the technical scheme of the application, aiming at the problem that the memory of the NFC tag is insufficient when data are written in, when a user inputs an instruction to the NFC tag, the NFC tag stores the input instruction as data to be written in, the NFC equipment can judge whether the data can be written in according to the comparison between the acquired data volume of the data to be written in and the storage space of the NFC tag, if the instruction data volume exceeds the storage space of the NFC tag, part of instructions in the NFC tag are deleted, and then the instructions are written in.
In an alternative embodiment, the implementation is as follows:
step 1, a user inputs one or more instructions to an NFC device (namely, an intelligent device), and the NFC device stores the input instructions as data to be written.
And step 2, acquiring the available storage space of the NFC label and the data volume of the data to be written.
Step 2.1, when the NFC tag enters the sensing range of the NFC device, the NFC device may obtain an address interval [ startAddr, endAddr ] of the NFC tag where data can be currently written, so as to obtain an available storage space of the NFC tag.
And 2.2, searching the data volume corresponding to each instruction written by the user in the step 1 from an instruction database stored in the NFC equipment to obtain the data volume of all instructions.
For example, the address interval for acquiring the current writable data is [1052, 1252], and the available storage space of the NFC tag is 200. (byte ) to find the data size of each instruction in step 1 from the instruction database stored in the NFC device, and obtain the total data size of all instructions as 250.
And step 3, judging whether the data volume of the data to be written exceeds the storage space of the NFC label.
If the data volume of the data to be written exceeds the available storage space of the NFC tag: the NFC equipment writes a 'delete' instruction into the NFC tag, wherein the 'delete' instruction is used for deleting the instruction stored in the NFC tag firstly or the instruction with the earliest last use time.
And if the data volume of the data to be written still exceeds the available storage space of the NFC label after the instruction is deleted, repeating the deleting step until the data volume of the data to be written does not exceed the storage space of the NFC label.
If the data volume of the data to be written does not exceed the storage space of the NFC tag: and the NFC equipment directly writes the data to be written into the NFC tag.
In yet another alternative embodiment, the implementation is as follows:
step 1, a user inputs one or more instructions to the NFC equipment, and the NFC equipment stores the input instructions as data to be written.
Step 2, obtaining the final use time of all instructions in the NFC label: when the NFC tag enters the sensing range of the NFC device, the NFC device can obtain the last usage time of all instructions in the NFC tag.
And 3, displaying N instructions of which the last use time is within a preset time range in the NFC equipment (all default options can be selected, part of options or all options can be cancelled, and the user confirms that the selected instructions are the instructions to be deleted after deletion) and prompting the user to delete the instructions. For example, all instructions that the last usage time is 30 days ago are presented in the NFC device, prompting the user to delete.
When the user fully selects or cancels part of options to be deleted: and writing the instruction in the step 1 into the NFC label after the NFC equipment writes the deletion instruction into the NFC label. When the user cancels all the options to be deleted, the available storage space of the NFC label and the data volume of the data to be written are obtained, and whether the data volume of the data to be written exceeds the available storage space of the NFC label is judged: after deleting, when the data volume of the data to be written still exceeds the available storage space of the NFC label, repeating the steps; and when the data volume of the data to be written does not exceed the available storage space of the NFC tag, the NFC equipment writes an instruction to the NFC tag.
Optionally, the user can be reminded of timely clearing the data instruction in the collision sticker so as to prevent the storage capacity of the data instruction in the collision sticker from being too much.
By adopting the technical scheme, the difficulty in writing the instructions in the collision paste can be avoided, or the instructions in the collision paste are too many in the later period, so that the inquiry and the execution are not easy, and the time is wasted.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method of the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided an instruction writing apparatus for implementing the instruction writing method. Fig. 2 is a schematic diagram of an alternative instruction writing apparatus according to an embodiment of the present application, and as shown in fig. 2, the apparatus may include:
an obtaining unit 21, configured to obtain an available storage space of the NFC tag when the first instruction set needs to be written into the NFC tag; an adjusting unit 23, configured to, when the available memory space of the NFC tag is smaller than the memory space required by the first instruction set, adjust the instruction in the NFC tag so that the available memory space of the NFC tag is not smaller than the memory space required by the first instruction set; a writing unit 25 for writing the first instruction set to the NFC tag.
Through the module, under the condition that a first instruction set needs to be written into the NFC tag, the available storage space of the NFC tag is obtained; under the condition that the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instruction in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; the first instruction set is written into the NFC tag, so that the technical problem that instructions cannot be written in the related technology can be solved.
Optionally, the adjusting unit is further configured to: deleting the second instruction set in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set; and under the condition that a space exists between the instructions in the NFC tag, adjusting the storage position of the instructions in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set.
Optionally, the adjusting unit is further configured to: acquiring the writing time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the writing time, wherein the instruction set with the early writing time is positioned in front of the instruction set with the late writing time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: acquiring the latest use time of each instruction set in the NFC label; sequencing the instruction sets in the NFC tag according to the use time, wherein the instruction set with the early use time is positioned before the instruction set with the late use time; under the condition that the available storage space of the NFC label is smaller than the storage space required by the first instruction set, searching a second instruction set which is ranked most front in the NFC label; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: acquiring a storage space occupied by each instruction set in the NFC label; determining a second instruction set in the NFC label according to the occupied storage space, wherein the sum of the storage space occupied by the second instruction set and the available storage space of the NFC label is not less than the storage space required by the first instruction set; deleting the second instruction set in the NFC tag.
Optionally, the adjusting unit is further configured to: displaying an instruction set in the NFC label on the intelligent terminal; detecting a selection operation on the intelligent terminal, wherein the selection operation is used for selecting a second instruction set in the displayed instruction set; deleting the second instruction set in the NFC tag.
Optionally, the obtaining unit is further configured to: acquiring an available address interval of the NFC label; and determining the available storage space of the NFC tag according to the available address interval.
It should be noted here that the modules described above are the same as the examples and application scenarios implemented by the corresponding steps, but are not limited to the disclosure of the above embodiments. It should be noted that the modules as a part of the apparatus may run in a corresponding hardware environment, and may be implemented by software, or may be implemented by hardware, where the hardware environment includes a network environment.
According to another aspect of the embodiments of the present application, there is also provided a server or a terminal for implementing the writing method of the above-mentioned instruction.
Fig. 3 is a block diagram of a terminal according to an embodiment of the present application, and as shown in fig. 3, the terminal may include: one or more processors 301 (only one shown in fig. 3), a memory 303, and a transmission means 305, as shown in fig. 3, the terminal may further comprise an input output device 307.
The memory 303 may be configured to store software programs and modules, such as program instructions/modules corresponding to the instruction writing method and apparatus in the embodiment of the present application, and the processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 303, that is, implements the instruction writing method. The memory 303 may include high speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 303 may further include memory located remotely from the processor 301, which may be connected to the terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The above-mentioned transmission device 305 is used for receiving or sending data via a network, and may also be used for data transmission between a processor and a memory. Examples of the network may include a wired network and a wireless network. In one example, the transmission device 305 includes a Network adapter (NIC) that can be connected to a router via a Network cable and other Network devices to communicate with the internet or a local area Network. In one example, the transmission device 305 is a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Among them, the memory 303 is used to store an application program in particular.
The processor 301 may call the application stored in the memory 303 via the transmission means 305 to perform the following steps:
under the condition that a first instruction set needs to be written into an NFC tag, obtaining an available storage space of the NFC tag; when the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instructions in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; writing the first set of instructions to the NFC tag.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
It can be understood by those skilled in the art that the structure shown in fig. 3 is only an illustration, and the terminal may be a terminal device such as a smart phone (e.g., an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile Internet Device (MID), a PAD, etc. Fig. 3 is a diagram illustrating the structure of the electronic device. For example, the terminal may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in FIG. 3, or have a different configuration than shown in FIG. 3.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program instructing hardware associated with the terminal device, where the program may be stored in a computer-readable storage medium, and the storage medium may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
Embodiments of the present application also provide a storage medium. Alternatively, in this embodiment, the storage medium may be used to execute a program code of a writing method of the instruction.
Optionally, in this embodiment, the storage medium may be located on at least one of a plurality of network devices in a network shown in the above embodiment.
Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps:
under the condition that a first instruction set needs to be written into an NFC tag, obtaining an available storage space of the NFC tag; when the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instructions in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set; writing the first set of instructions to the NFC tag.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A method for writing an instruction, comprising:
acquiring available storage space of an NFC tag under the condition that a first instruction set needs to be written into the NFC tag, wherein the first instruction set comprises instructions required by a first operation;
when the available storage space of the NFC tag is smaller than the storage space required by the first instruction set, adjusting the instructions in the NFC tag so that the available storage space of the NFC tag is not smaller than the storage space required by the first instruction set;
writing the first set of instructions to the NFC tag.
2. The method of claim 1, wherein adjusting the instructions in the NFC tag such that the available memory space of the NFC tag is not less than the memory space required by the first set of instructions comprises:
deleting a second instruction set in the NFC tag so that the available memory space of the NFC tag is not less than the memory space required by the first instruction set, wherein the second instruction set comprises instructions required by a second operation; and/or the presence of a gas in the gas,
and under the condition that a space exists between the instructions in the NFC tag, adjusting the storage position of the instructions in the NFC tag so that the available storage space of the NFC tag is not less than the storage space required by the first instruction set.
3. The method of claim 2, wherein deleting the second set of instructions in the NFC tag such that the available memory space of the NFC tag is not less than the memory space required by the first set of instructions comprises:
acquiring the writing time of each instruction set in the NFC label;
sequencing the instruction sets in the NFC tag according to the writing time, wherein the instruction set with the early writing time is in front of the instruction set with the late writing time, and each instruction set in the NFC tag corresponds to one operation;
searching the second instruction set which is ranked the most front in the NFC tags under the condition that the available storage space of the NFC tags is smaller than the storage space required by the first instruction set;
deleting the second instruction set in the NFC tag.
4. The method of claim 2, wherein deleting the second set of instructions in the NFC tag such that the available memory space of the NFC tag is not less than the memory space required by the first set of instructions comprises:
acquiring the latest use time of each instruction set in the NFC label;
sequencing the instruction sets in the NFC tag according to the use time, wherein the instruction set with the early use time is positioned before the instruction set with the late use time;
searching the second instruction set which is ranked the most front in the NFC tags under the condition that the available storage space of the NFC tags is smaller than the storage space required by the first instruction set;
deleting the second instruction set in the NFC tag.
5. The method of claim 2, wherein deleting the second set of instructions in the NFC tag such that the available memory space of the NFC tag is not less than the memory space required by the first set of instructions comprises:
acquiring a storage space occupied by each instruction set in the NFC label;
determining the second instruction set in the NFC tag according to the occupied storage space, wherein the sum of the storage space occupied by the second instruction set and the available storage space of the NFC tag is not less than the storage space required by the first instruction set;
deleting the second instruction set in the NFC tag.
6. The method of claim 2, wherein deleting the second set of instructions in the NFC tag comprises:
displaying the instruction set in the NFC label on the intelligent terminal;
detecting a selection operation on the intelligent terminal, wherein the selection operation is used for selecting a second instruction set in the displayed instruction sets;
deleting the second instruction set in the NFC tag.
7. The method according to any of claims 1 to 6, wherein obtaining the available memory space of the NFC tag comprises:
acquiring an available address interval of the NFC label;
and determining the available storage space of the NFC tag according to the available address interval.
8. An apparatus for writing an instruction, comprising:
the NFC tag comprises an acquisition unit, a storage unit and a processing unit, wherein the acquisition unit is used for acquiring the available storage space of the NFC tag under the condition that a first instruction set needs to be written into the NFC tag;
an adjusting unit, configured to, when an available memory space of the NFC tag is smaller than a memory space required by the first instruction set, adjust an instruction in the NFC tag so that the available memory space of the NFC tag is not smaller than the memory space required by the first instruction set;
a write unit to write the first instruction set to the NFC tag.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program when executed performs the method of any of the preceding claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 7 by means of the computer program.
CN202111566420.2A 2021-12-20 2021-12-20 Instruction writing method and device, storage medium and electronic device Withdrawn CN114239785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111566420.2A CN114239785A (en) 2021-12-20 2021-12-20 Instruction writing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111566420.2A CN114239785A (en) 2021-12-20 2021-12-20 Instruction writing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN114239785A true CN114239785A (en) 2022-03-25

Family

ID=80759867

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111566420.2A Withdrawn CN114239785A (en) 2021-12-20 2021-12-20 Instruction writing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN114239785A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160381496A1 (en) * 2013-06-03 2016-12-29 Samsung Electronics Co., Ltd. Method and apparatus to write tag using near field communication
CN110059514A (en) * 2019-04-18 2019-07-26 珠海美佳音科技有限公司 Method for writing data, NFC label, NFC device and storage medium
CN110191054A (en) * 2019-05-06 2019-08-30 Oppo广东移动通信有限公司 Route processing method and device, storage medium and electronic equipment
CN110543382A (en) * 2019-09-03 2019-12-06 上海联影医疗科技有限公司 method and system for storing scanning data of medical imaging equipment
CN110581877A (en) * 2018-06-11 2019-12-17 佛山市顺德区美的电热电器制造有限公司 Communication method and device, electronic equipment and readable storage medium
CN112995069A (en) * 2019-12-16 2021-06-18 华为技术有限公司 Instruction writing method and device and network equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160381496A1 (en) * 2013-06-03 2016-12-29 Samsung Electronics Co., Ltd. Method and apparatus to write tag using near field communication
CN110581877A (en) * 2018-06-11 2019-12-17 佛山市顺德区美的电热电器制造有限公司 Communication method and device, electronic equipment and readable storage medium
CN110059514A (en) * 2019-04-18 2019-07-26 珠海美佳音科技有限公司 Method for writing data, NFC label, NFC device and storage medium
CN110191054A (en) * 2019-05-06 2019-08-30 Oppo广东移动通信有限公司 Route processing method and device, storage medium and electronic equipment
CN110543382A (en) * 2019-09-03 2019-12-06 上海联影医疗科技有限公司 method and system for storing scanning data of medical imaging equipment
CN112995069A (en) * 2019-12-16 2021-06-18 华为技术有限公司 Instruction writing method and device and network equipment

Similar Documents

Publication Publication Date Title
KR101788691B1 (en) Method for realizing selection of security unit in near field communication, mobile terminal and pos machine
CN109656980A (en) Data processing method, electronic equipment, device and readable storage medium storing program for executing
CN104598286B (en) The Oftware updating method and device of mobile terminal
CN108810123A (en) The method and apparatus for opening mobile cellular network service
CN106502826A (en) Data backup and transmission method and mobile terminal
CN106101989A (en) A kind of method selecting safe unit and mobile terminal
CN104601683A (en) File download management method, mobile terminal and communication system
CN105741106A (en) Selection method and device of NFC (Near Field Communication) payment way
CN106445743A (en) Data backup transmission method and mobile terminal
CN105471988A (en) contact person information pushing method, server and terminal
CN105872980B (en) A kind of method and device scanning wireless network signal
CN105101153A (en) Data roaming method, device and system
CN106686545A (en) Method and apparatus for applying wireless fidelity country code
CN104581721A (en) Dual-card structure-based mobile service data processing method and system, and mobile terminal
CN105577734A (en) Information backup method, device, server and terminal
CN105550870B (en) Method, device and terminal for processing routing strategy
KR102037556B1 (en) Method and device for upgrading telephone number in wireless terminal self-adaptive network upgrade
CN103559091A (en) Data scheduling method and split type terminal system
CN114239785A (en) Instruction writing method and device, storage medium and electronic device
CN107889191B (en) Connection method, device and equipment of wireless local area network and computer readable storage medium
CN101997885B (en) User data scheduling method, server and data center
CN105657691A (en) Mobile terminal and data sharing method of double-chip system thereof
CN106941709B (en) Pass through the method and apparatus of the application connection wireless access point in user equipment
EP4148615A1 (en) Near field communication (nfc) method and apparatus, and electronic device
CN112887958A (en) Data storage method, storage medium and terminal 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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220325