Data storage method and device, equipment, medium and product
By detecting and filtering the target character encoding in the received data on the first user side, the data error or garbled problem caused by inconsistent encoding of different users is solved, and the data cleaning and storage are realized, which improves the integrity of the data and the user. Experience.
Patent Information
- Application Number
- CN202411238579.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-12-24
AI Technical Summary
During the data transmission process between different users, due to inconsistent encoding and different data processing methods, data errors or garbled codes may be caused, affecting the integrity of the data and user experience.
When the first user end receives the data from the second user end, the character encoding in the data is detected, the target character encoding in the standard information exchange encoding table is filtered out, the encoding that does not meet the standards is removed, and the cleaned data is generated and stored.
Improve the quality of received data, ensure the integrity and consistency of data, and improve the user experience.
Smart Images

Figure CN119180263A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of data processing technology, and in particular, relates to a data storage method, device, equipment, medium and product. Background Art
[0002] Currently, a user terminal may obtain data sent by other user terminals. However, due to the differences in data storage formats or data processing methods among different user terminals, the data received by the user terminal may contain errors or garbled characters, resulting in low data transmission quality and poor integrity of the received data, affecting the user experience. Summary of the invention
[0003] The embodiments of the present application provide a data storage method, apparatus, device, medium and product, which can filter out erroneous or garbled character codes and improve the data quality of the character codes.
[0004] In a first aspect, an embodiment of the present application provides a data storage method, which is applied to a first user terminal, and the method includes:
[0005] Receive first data, where the first data is data stored in a second user terminal, and the first data includes a plurality of character codes, wherein the character code is a character code generated based on a character string, and one character code corresponds to one character string;
[0006] Detecting whether the target character code is included in the plurality of character codes, determining a first character code including the target character code, and generating second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table;
[0007] The second data including the first character code is stored in the storage space.
[0008] In a second aspect, an embodiment of the present application provides a data storage device, applied to a first user terminal, and a method comprising:
[0009] A receiving module, configured to receive first data, the first data being data stored in a second user terminal, the first data comprising a plurality of character codes, wherein the character code is a character code generated based on a character string, and one character code corresponds to one character string;
[0010] A detection module, used to detect whether the target character code is included in the plurality of character codes, determine a first character code including the target character code, and generate second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table;
[0011] The storage module is used to store the second data including the first character code into the storage space.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0013] a processor and a memory storing computer program instructions;
[0014] When the processor executes the computer program instructions, it is used to execute the data storage method of the first aspect mentioned above.
[0015] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the data storage method of the first aspect described above is implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the data storage method of the first aspect when processed by a processor.
[0017] The data storage method, apparatus, device, medium and product provided in the embodiments of the present application detect whether the target character code is included in the multiple character codes included in the first data when the first data from the second user terminal is received at the first user terminal, and then generate the second data with the first character code including the target character code, thereby filtering the character codes, removing the character codes that do not include the target character code, and then storing the second data including the first character code, thereby eliminating the data that may contain errors or garbled codes, and improving the quality of the received data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 A flowchart of a data storage method provided for some embodiments of the present application.
[0020] Figure 2 A flowchart of another data storage method provided for some embodiments of the present application.
[0021] Figure 3 A flowchart of another data storage method provided for some embodiments of the present application.
[0022] Figure 4 A flowchart of another data storage method provided for some embodiments of the present application.
[0023] Figure 5 A flowchart of another data storage method provided for some embodiments of the present application.
[0024] Figure 6 A schematic diagram of a data storage device provided for some embodiments of the present application.
[0025] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0027] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0028] It should be noted that the acquisition, storage, use and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.
[0029] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0030] Before describing the technical solutions provided by the embodiments of the present application, in order to facilitate the understanding of the embodiments of the present application, the present application first specifically describes the problems existing in the related art:
[0031] With the development of information technology, data interaction between different user terminals is becoming more and more frequent, so the requirements for data quality are getting higher and higher. However, when data is transmitted between different user terminals, there may be data errors or garbled codes. The reasons for the above problems may include the following:
[0032] 1. The data encoding of different user terminals is inconsistent. During data transmission or storage, different encoding methods of different user terminals are different, which may cause garbled characters.
[0033] 2. Different user terminals have different data processing methods. Different user terminals may use different data processing methods and storage formats, which may cause garbled data when transferring data from one user terminal to another.
[0034] 3. Data integrity is damaged when different user terminals transmit data. During the data transmission or storage process between different user terminals, data integrity may be damaged due to various reasons (such as network failure, hardware failure, etc.), resulting in garbled characters.
[0035] Based on this, the embodiments of the present application provide a data storage method, device, equipment, medium and product, which can solve the above problems.
[0036] In some embodiments, Figure 1 As shown, an embodiment of the present application provides a data storage method, which is applied to a first user terminal. The method may include steps S110-S130:
[0037] S110: Receive first data, where the first data is data stored in a second user terminal, and the first data includes a plurality of character codes, wherein the character code is a character code generated based on a character string, and one character code corresponds to one character string.
[0038] The first user terminal may receive the first data stored in the second user terminal. Here, the first user terminal may directly receive the first data transmitted by the second user terminal, or the first user terminal may receive the user's first input, and the first input includes the above-mentioned first data.
[0039] Here, the first data may include multiple character codes, and the character code may be a character code generated based on a character string. It is conceivable that when the character string is stored on the second user end, the character string will be converted into a character code, for example, the character string will be converted into a Unicode-encoded character code.
[0040] In some examples, the string may be converted to UTF-8 or UTF-16 character encoding.
[0041] S120: Detect whether the target character code is included in the multiple character codes, determine a first character code including the target character code, and generate second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table.
[0042] It can be detected whether multiple character encodings include the target character encoding. Here, the target character encoding is the character encoding in the standard information exchange encoding table. For example, when the character encoding is an encoding obtained based on the Unicode encoding algorithm, the target character encoding can be an encoding based on the standard information exchange encoding (ASCII code) table.
[0043] It is conceivable that the first character code is a character code generated based on the original character string and the standard information exchange code table.
[0044] S130: storing the second data including the first character code into the storage space.
[0045] The second data including the first character code may be stored in a storage space. During storage, the first user terminal may store the second data in a storage space designated by a user in response to user input.
[0046] In some examples, when the second data including the first character codes is stored in the storage space, the relative positions of the first character codes can be kept unchanged, so that when the first character codes are subsequently restored to obtain the original character string, the relative positions of the character strings can be kept unchanged.
[0047] The embodiment of the present application detects whether the target character code is included in multiple character codes included in the first data when the first data from the second user terminal is received at the first user terminal, and generates second data from the first character code including the target character code, thereby removing character codes that may have errors or garbled codes and do not include the target character code, thereby cleaning the character codes, and then storing the second data including the first character code, thereby eliminating data that may have errors or garbled codes and improving the quality of the received data.
[0048] In the above-mentioned character code cleaning process, the specified character code can be removed in response to the user's operation, thereby improving the flexibility of the character code cleaning process.
[0049] In some embodiments, Figure 2As shown, the above-mentioned target character code may include a sub-target character code, the sub-target character code is a character code determined based on the identification information of the character code input by the user, the first character code may include a second character code, the second character code is a character code that does not include the sub-target character code; the second data may include second sub-data, the second sub-data is data including the second character code;
[0050] Step S130: storing the second data including the first character code into the storage space may include:
[0051] S210: storing the second sub-data including the second character code into the storage space.
[0052] Here, the sub-target character code can be a sub-target character code determined by the user based on the identifier of the character code carried by the user input of the first user terminal, the sub-target character code can be a part of the character code in the standard information exchange code table, and the sub-target character code can be a character code of a string specified by the user, such as a carriage return or a vertical bar. When detecting whether the target character code is included in the multiple character codes, a second character code that does not include the sub-target character code can be determined in the first character code included in the second data, and the second sub-data can be determined based on the second character code.
[0053] The second sub-data including the second character code can be stored in the storage space. Similarly, when storing the second sub-data, the relative positions of the plurality of second character codes can be kept unchanged on the original basis.
[0054] In some examples, the sub-target character encoding may be the character encoding corresponding to the string occupying the target memory. For example, the character encoding corresponding to the string occupying the target memory with 3 bytes is determined as the sub-target character encoding. Based on the above method, the character encoding corresponding to the string occupying the target memory specified by the user can be screened out to improve the flexibility of character encoding cleaning.
[0055] The embodiment of the present application determines the sub-target character code in the standard information exchange code table based on the character identifier included in the user input during the above-mentioned character code cleaning process, removes the first character code including the sub-target character code, retains the second character code that does not include the sub-target character code, obtains the second sub-data based on the second character code, and then stores the second sub-data including the second character code to achieve cleaning of part of the character codes in the standard information exchange code table specified by the user while cleaning the character codes in the above-mentioned non-standard information exchange code table, thereby improving data quality and the flexibility of character code cleaning.
[0056] In some embodiments, Figure 3As shown, before the above step S210: storing the second sub-data including the second character code into the storage space, the method may further include:
[0057] S310: Detect whether the first character code includes the sub-target character code, determine the second character code that does not include the sub-target character code and the third character code that includes the target sub-character code.
[0058] S320: In response to receiving a target operation of the user, setting the third character code as a preset character code, and generating third data based on the second character code and the preset character code.
[0059] S330: storing the third data including the second character code and the preset character code into the storage space.
[0060] Here, it is possible to detect whether the first character code includes the above sub-target character code, determine the second character code that does not include the sub-target character code and the third character code that includes the above sub-target character code, and in response to the user's target operation, set the third character code to a preset character code, where the preset character code can be an invisible character code, for example, set to "0x7F". It is conceivable that the above preset character code will be a blank character string when it is subsequently restored to a character string. Afterwards, the third data including the second character code and the preset character code can be stored in the storage space.
[0061] The embodiment of the present application detects whether the first character code includes the sub-target character code, and then sets the third character code including the sub-target character code as the preset character code in response to the user's target operation, thereby improving the flexibility of the above character code cleaning process. Afterwards, the third data including the above second character code and the preset character code is stored in the storage space, so that when the original character string is subsequently restored based on the character code included in the above third data, the relative positions of each character string are consistent with the relative positions of the original character string, thereby improving the data quality.
[0062] When the first client stores the second data, in order to save storage space of the first client, an exclusive storage space may be created based on the memory occupied by the first character code in the second data.
[0063] In some embodiments, Figure 4 As shown, before step S130: storing the second data including the first character code, the method may further include:
[0064] S410: Determine a target occupied memory corresponding to the first character code based on a correspondence between a preset character code and an occupied memory of a character string.
[0065] Here, the target occupied memory corresponding to the first character encoding can be determined based on the correspondence between the character encoding and the occupied memory of the string, and the occupied memory of the corresponding string can be determined based on the code value of the first character encoding. For example, when the code value of the first character encoding is greater than or equal to 0xFC, it indicates that the string corresponding to the first character encoding is a 5-byte string, and therefore the target occupied memory corresponding to the first character encoding is 5 bytes.
[0066] S420: Create a target storage space in the storage space that occupies the target memory.
[0067] A target storage space corresponding to the target occupied memory may be created in the storage space based on the target occupied memory. For example, when the target occupied memory is 5 bytes, a target storage space with a memory size of 5 bytes may be created.
[0068] Storing the second data including the first character code into the storage space includes:
[0069] S430: storing the second data including the first character code into the target storage space.
[0070] The second data including the first character code may be stored in the target storage space to achieve directional storage of the data.
[0071] It is conceivable that before storing the second sub-storage data including the second character code, the target occupied memory corresponding to the second character code can also be determined based on the above method, and a corresponding target storage space is created to store the second sub-data, which will not be repeated here.
[0072] The embodiment of the present application creates a target storage space corresponding to the target occupied memory based on the target occupied memory corresponding to the first character code included in the second data before storing the second data, thereby avoiding the problem of low storage space utilization due to excessive reserved storage space. The above method can not only improve the utilization of the storage space but also realize the targeted storage of the second data.
[0073] The first character code may include multiple characters. In this case, the corresponding target storage space may be determined based on the occupied memory corresponding to each character code, thereby improving the utilization rate of the storage space.
[0074] In some embodiments, Figure 5 As shown, the first character code may include multiple first sub-character codes, the target occupied memory may include multiple sub-target occupied memory, and the target storage space may include multiple sub-target storage spaces, wherein one first sub-character code corresponds to one sub-target occupied memory, and one sub-target occupied memory corresponds to one sub-target storage space.
[0075] Determining the target occupied memory corresponding to the first character code based on the correspondence between the preset character code and the occupied memory of the string may include:
[0076] S510: Determine the memory occupied by the sub-target corresponding to each first sub-character code based on the correspondence between the preset character code and the memory occupied by the character string.
[0077] When the first character code includes multiple first sub-character codes, the memory occupied by the sub-target corresponding to each first sub-character code in the multiple first sub-character codes can also be determined based on the above-mentioned corresponding relationship. For example, it is determined that the sub-target of the first sub-character code with a code value greater than or equal to 0xF0 occupies 4 bytes of memory, and the sub-target of the first sub-character code with a code value greater than or equal to 0xE0 occupies 3 bytes of memory, etc.
[0078] Create a target storage space in the storage space to occupy the memory of the target, which can include:
[0079] S520: Create each sub-goal storage space corresponding to the memory occupied by each sub-goal in the storage space.
[0080] For each sub-target that occupies memory, a sub-target storage space corresponding to the memory occupied by each sub-target can be created in the storage space, for example, a 3-byte storage space is created for the first sub-character code of the sub-target that occupies 3 bytes of memory, and a 4-byte storage space is created for the first sub-character code of the sub-target that occupies 4 bytes of memory, etc.
[0081] Storing the second data including the first character code into the target storage space may include:
[0082] S530: storing each first sub-character code in the second data including a plurality of first sub-character codes into a corresponding sub-target storage space.
[0083] Each first sub-character code in the plurality of first sub-character codes can be stored in a corresponding sub-target storage space. Here, when creating each sub-target storage space, it can be created sequentially based on the order of the original first sub-character codes, and then each first sub-character code can be stored sequentially in order.
[0084] The embodiment of the present application can maximize the storage utilization of the storage space by determining the memory occupied by the sub-target corresponding to each first sub-character code when the first character code includes multiple first sub-character codes, creating a sub-target storage space corresponding to the memory occupied by the sub-target, and storing each first sub-character code in the corresponding sub-target storage space.
[0085] In order to improve the efficiency of the above character code cleaning process, a dedicated cleaning interface may be set in the first user terminal, and data including the first character code is received through the dedicated interface and the first character code is cleaned.
[0086] In some embodiments, the receiving of the first data may include:
[0087] The first data is acquired based on a preset interface.
[0088] A preset interface can be set in the first user terminal. The preset interface can directly receive the first data sent by the second user terminal, or receive the first data based on user input. By setting the preset interface to obtain data, it can avoid occupying other interfaces in the first user terminal, which does not affect other services of the first user terminal and can also improve the efficiency of the above-mentioned process of cleaning character codes.
[0089] In some embodiments, the first data may include a data file, and the data file may include a starting character code and an ending character code. The preset interface may determine, based on the first position and the second position, a portion of the character codes between the starting character code and the ending character code in the data file when the starting character code in the data file is detected to be at the first position of the data file and the ending character code is at the second position of the data file, and then the first user terminal performs a step of cleaning the character codes for the portion of the character codes. Based on the above method, it is possible to clean the portion of the character codes and implement user-defined cleaning of the character codes.
[0090] In some embodiments, the character encoding is a hexadecimal character encoding, and the target character encoding is a character encoding in a hexadecimal standard information exchange encoding table.
[0091] The above character encoding may be a hexadecimal character encoding, and the target character encoding may be a character encoding in a hexadecimal standard information exchange encoding table. It is conceivable that by executing the cleaning step based on the above hexadecimal character encoding, the efficiency of the cleaning process can be improved.
[0092] Here, when the first data sent by the second user terminal includes non-hexadecimal character encoding, such as octal character encoding or binary character encoding, the above-mentioned target character encoding can be adaptively adjusted based on the character encoding of the first data, for example, the target character encoding is adjusted to the character encoding in the corresponding octal standard information exchange coding table or the character encoding in the binary standard information exchange coding table.
[0093] In some examples, the first user terminal may convert non-hexadecimal character codes in the received first data into unified hexadecimal character codes based on the conversion relationship between character codes of different bases, so as to improve the efficiency of the subsequent character code cleaning process.
[0094] Based on the same inventive concept, an embodiment of the present application also provides a data storage device.
[0095] In some embodiments, Figure 6 As shown, an embodiment of the present application provides a data storage device, which is applied to a first user terminal, and the method includes:
[0096] The receiving module 601 is used to receive first data, where the first data is data stored in the second user terminal, and the first data includes multiple character codes, wherein the character code is a character code generated based on a character string, and one character code corresponds to one character string;
[0097] A detection module 602 is used to detect whether the target character code is included in the plurality of character codes, determine a first character code including the target character code, and generate second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table;
[0098] The storage module 603 is used to store the second data including the first character code into the storage space.
[0099] In some embodiments, the target character code includes a sub-target character code, the sub-target character code is a character code determined based on identification information of a character code input by a user, the first character code includes a second character code, the second character code is a character code that does not include the sub-target character code; the second data includes second sub-data, the second sub-data includes the second character code;
[0100] Storage modules can also be used to:
[0101] The second sub-data including the second character code is stored in the storage space.
[0102] In some embodiments, the storage module may also be used to:
[0103] Determine the target occupied memory corresponding to the first character code based on the correspondence between the preset character code and the occupied memory of the string;
[0104] Create a target storage space in the storage space that occupies the target memory;
[0105] The second data including the first character code is stored in the target storage space.
[0106] In some embodiments, the first character code includes a plurality of first sub-character codes, the target occupied memory includes a plurality of sub-target occupied memory, and the target storage space includes a plurality of sub-target storage spaces, wherein one first sub-character code corresponds to one sub-target occupied memory, and one sub-target occupied memory corresponds to one sub-target storage space.
[0107] Storage modules can also be used to:
[0108] Based on the correspondence between the preset character encoding and the memory occupied by the string, determine the memory occupied by the sub-target corresponding to each first sub-character encoding;
[0109] Create each sub-goal storage space corresponding to the memory occupied by each sub-goal in the storage space;
[0110] Each first sub-character code in the second data including a plurality of first sub-character codes is stored in a corresponding sub-target storage space.
[0111] In some embodiments, the receiving module may be specifically used for:
[0112] The first data is acquired based on a preset interface.
[0113] In some embodiments, the character encoding is a hexadecimal character encoding, and the target character encoding is a character encoding in the information exchange standard hexadecimal encoding table.
[0114] The device of the above embodiment is used to implement the corresponding data storage method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0115] Figure 7 A schematic diagram of the hardware structure of an electronic device provided in an application embodiment.
[0116] The electronic device 700 may include a processor 701 and a memory 702 storing computer program instructions.
[0117] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0118] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.
[0119] In certain embodiments, memory 702 includes a read-only memory (ROM). The ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of the above, where appropriate.
[0120] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to the first aspect of the present application.
[0121] The processor 701 implements any one of the data storage methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .
[0122] In one example, the electronic device may further include a communication interface 703 and a bus 704. Figure 7 The processor 701, the memory 702, and the communication interface 703 are connected via a bus 704 and communicate with each other.
[0123] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0124] Bus 704 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 704 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0125] The electronic device of the above embodiment is used to implement the corresponding data storage method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0126] In addition, in combination with the data storage method in the above embodiment, the embodiment of the present application can provide a computer storage medium to implement. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any one of the data storage methods in the above embodiment is implemented.
[0127] In addition, in combination with the data storage method in the above embodiment, the embodiment of the present application can provide a computer program product to implement. When the computer program product instructions are executed by the processor of the electronic device, any one of the data storage methods in the above embodiment is implemented.
[0128] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0129] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0130] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or devices based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0131] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (device) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0132] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application.
Claims
1. A data storage method, characterized in that: Applied to a first user terminal, the method includes: Receive first data, where the first data is data stored in a second user terminal, and the first data includes a plurality of character codes, wherein the character codes are character codes generated based on character strings, and one character code corresponds to one character string; Detecting whether the multiple character codes include a target character code, determining a first character code including the target character code, and generating second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table; The second data including the first character code is stored in a storage space.
2. The data storage method according to claim 1, characterized in that: The target character code includes a sub-target character code, the sub-target character code is a character code determined based on identification information of a character code input by a user, the first character code includes a second character code, the second character code is a character code that does not include the sub-target character code; the second data includes second sub-data, the second sub-data includes the second character code; The step of storing the second data including the first character code into a storage space comprises: The second sub-data including the second character code is stored in the storage space.
3. The data storage method according to claim 1, characterized in that: Before storing the second data including the first character encoding, the method further includes: Determine the target occupied memory corresponding to the first character code based on the correspondence between the preset character code and the occupied memory of the string; Create a target storage space in the storage space where the target occupies memory; The step of storing the second data including the first character code into a storage space comprises: The second data including the first character code is stored in the target storage space.
4. The data storage method according to claim 3, characterized in that: The first character code includes a plurality of first sub-character codes, the target occupied memory includes a plurality of sub-target occupied memory, and the target storage space includes a plurality of sub-target storage spaces, wherein one of the first sub-character codes corresponds to one of the sub-target occupied memory, and one of the sub-target occupied memory corresponds to one of the sub-target storage spaces, The determining the target occupied memory corresponding to the first character encoding based on the correspondence between the preset character encoding and the occupied memory of the string includes: Based on the correspondence between the preset character codes and the memory occupied by the character string, determining the memory occupied by the sub-target corresponding to each of the first sub-character codes; The step of creating the target storage space of the target memory in the storage space includes: Creating each sub-goal storage space corresponding to the memory occupied by each sub-goal in the storage space; The step of storing the second data including the first character code into the target storage space comprises: Each of the first sub-character codes in the second data including a plurality of the first sub-character codes is stored in the corresponding sub-target storage space.
5. The data storage method according to claim 1, characterized in that: The receiving first data comprises: The first data is acquired based on a preset interface.
6. The data storage method according to claim 1, characterized in that: The character code is a hexadecimal character code, and the target character code is a character code in an information exchange standard hexadecimal code table.
7. A data storage device, characterized in that: Applied to a first user terminal, the method includes: A receiving module, configured to receive first data, wherein the first data is data stored in a second user terminal, and the first data includes a plurality of character codes, wherein the character codes are character codes generated based on character strings, and one character code corresponds to one character string; a detection module, configured to detect whether the plurality of character codes include a target character code, determine a first character code including the target character code, and generate second data based on the first character code, wherein the target character code is a character code in a standard information exchange code table; The storage module is used to store the second data including the first character code into a storage space.
8. An electronic device, characterized in that: The device comprises: a processor, and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the data storage method according to any one of claims 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, which, when executed by a processor, implement the data storage method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is processed by a processor, the data storage method according to any one of claims 1 to 6 is implemented.
