CN109033467B - Compression method, device, medium and electronic equipment for multi-option form - Google Patents

Compression method, device, medium and electronic equipment for multi-option form Download PDF

Info

Publication number
CN109033467B
CN109033467B CN201811014462.3A CN201811014462A CN109033467B CN 109033467 B CN109033467 B CN 109033467B CN 201811014462 A CN201811014462 A CN 201811014462A CN 109033467 B CN109033467 B CN 109033467B
Authority
CN
China
Prior art keywords
item
sorting
information
items
selection
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.)
Active
Application number
CN201811014462.3A
Other languages
Chinese (zh)
Other versions
CN109033467A (en
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.)
JD Digital Technology Holdings Co Ltd
Jingdong Technology Holding Co Ltd
Original Assignee
JD Digital Technology Holdings 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 JD Digital Technology Holdings Co Ltd filed Critical JD Digital Technology Holdings Co Ltd
Priority to CN201811014462.3A priority Critical patent/CN109033467B/en
Publication of CN109033467A publication Critical patent/CN109033467A/en
Application granted granted Critical
Publication of CN109033467B publication Critical patent/CN109033467B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention provides a compression method, a device, a medium and electronic equipment of a multi-option form, which comprises the following steps: acquiring multi-option item form information, wherein the multi-option item form information comprises: character information of the item and a selection result of the item; carrying out first sequencing on items in the multi-option item form information according to the character information of the items, and determining an item sequencing list; performing second sorting on the item selection results according to the item arrangement sequence in the item arrangement list, and determining item selection result sorting information; and compressing the sorting information of the selection results, and outputting the compression results obtained after compression. The technical scheme of the embodiment of the invention can compress the characters of the multiple-choice item form by utilizing the attribute information of the plug-in, thereby improving the warehousing efficiency of a large number of multiple-choice item forms and reducing the probability of warehousing error report.

Description

Compression method, device, medium and electronic equipment for multi-option form
Technical Field
The invention relates to the technical field of computers, in particular to a compression method, a compression device, a compression medium and electronic equipment for a multi-option form.
Background
The check drop-down box component is an element based HTML language standard by which a single or multiple choice menu can be created, the browser submits the selected item when the form is submitted, or collects multiple choices separated by commas, combines them into a single parameter list, and includes attributes such as name when the < select > form data is submitted to the server.
The current mainstream check drop-down box components are mainly as follows:
(1) and checking a drop-down box plug-in based on bootstrap.
The component has the advantages of simple style, complete documents and strong functions. The simple cascading style sheet and the html rule are provided, the more perfect humanized website style is provided, and most jQuery plug-ins are compatible.
(2) And checking a drop-down box plug-in based on jquery.
The component can keep the separation of the code and the html content, namely, js is not required to be inserted into html to call commands, only id is required to be defined, and the usability and the expansibility are strong.
(3) Drop-down box plug-ins are checked based on vue.
The component can conveniently realize the bidirectional binding of data, so that the component has great advantages in the aspects of processing forms and man-machine interaction.
The above prior art has the following problems:
(1) for users with special requirements, such as ordering content, modifying return value format, etc., the bootstrap framework brings great trouble to the users, and a large amount of css rewriting is needed to improve, so that the website loses the meaning of using the framework.
(2) When multiple plug-ins are used on the same page, it is easy to encounter conflicts, especially when the plug-ins rely on the same event or selector, and cannot support a custom return value format, requiring js components to be rewritten, which is difficult for the average user.
(3) The occupied space is large, and especially when the options are selected too much, if the warehousing length is larger than the length of the database field, serious exception is caused, and the program is abnormally ended.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a compression method, a compression device, a compression medium and electronic equipment for a multi-option form, and further solves one or more problems that in the related technology, the operation difficulty of a user is high and the entry is easy to report errors to at least a certain extent.
Additional features and advantages of the invention will be set forth in the detailed description which follows, or may be learned by practice of the invention.
According to a first aspect of the embodiments of the present invention, there is provided a data splicing method, including:
acquiring multi-option item form information, wherein the multi-option item form information comprises: character information of the item and a selection result of the item;
carrying out first sequencing on items in the multi-option item form information according to the character information of the items, and determining an item sequencing list;
performing second sorting on the item selection results according to the item arrangement sequence in the item arrangement list, and determining item selection result sorting information;
and compressing the sorting information of the selection results, and outputting the compression results obtained after compression.
In an embodiment of the present invention, the first sorting the items in the multi-choice item form information according to the character information of the items, and determining the item sorting list includes:
and sorting the character information of the items according to a preset character string sorting rule to determine a project sorting list.
In an embodiment of the present invention, before performing the second sorting on the selection results of the items according to the item arrangement order in the item ordered list, the method further includes:
detecting the multi-option item form;
when the selection result of the option in the multi-option item form is detected to be selected, the selection result of the option is identified by binary digit 1;
when the selection result of the option in the multi-choice item form is detected to be unselected, the selection result of the option is identified by a binary digit 0.
In an embodiment of the present invention, the second sorting the selection results of the items according to the item arrangement order in the item ordered list, and determining the sorting information of the selection results of the items includes:
traversing each item in the item ranking list to determine a selection result of each item;
and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the item binary digit selection results.
In an embodiment of the present invention, the compressing the sorting information of the selection result includes:
sequentially splitting the sorting information of the selection results of the binary digital identifiers according to a preset splitting rule to obtain each splitting result;
carrying out hexadecimal conversion on each split result according to the split sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers;
and determining the sorting information of the selection results identified by the hexadecimal numbers as compression results.
According to a second aspect of the embodiments of the present invention, there is provided an apparatus for compressing a multiple-choice item form, including:
the acquisition module is used for acquiring the form information of the multiple-choice items, wherein the form information of the multiple-choice items comprises: character information of the item and a selection result of the item;
the first ordering module is used for carrying out first ordering on the items in the multi-choice item form information according to the character information of the items to determine an item ordering list;
the second sorting module is used for carrying out second sorting on the selection results of the items according to the item arrangement sequence in the item arrangement list and determining the sorting information of the item selection results;
and the compression module is used for compressing the sorting information of the selection results and outputting the compression results obtained after compression.
In an embodiment of the present invention, the first sorting module is specifically configured to:
and sorting the character information of the items according to a preset character string sorting rule to determine a project sorting list.
In one embodiment of the present invention, further comprising:
the identification module is used for detecting the multi-option form; when the selection result of the option in the multi-option item form is detected to be selected, the selection result of the option is identified by binary digit 1; when the selection result of the option in the multi-choice item form is detected to be unselected, the selection result of the option is identified by a binary digit 0.
In an embodiment of the invention, the second sorting module is specifically configured to:
traversing each item in the item ranking list to determine a selection result of each item;
and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the item binary digit selection results.
In an embodiment of the present invention, the compression module is specifically configured to:
sequentially splitting the sorting information of the selection results of the binary digital identifiers according to a preset splitting rule to obtain each splitting result; carrying out hexadecimal conversion on each split result according to the split sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers; and determining the sorting information of the selection results identified by the hexadecimal numbers as compression results.
According to a third aspect of embodiments of the present invention, there is provided a computer readable medium, on which a computer program is stored, the program, when executed by a processor, implementing the method for compressing a multiple choice item form according to the first aspect of the embodiments.
According to a fourth aspect of embodiments of the present invention, there is provided an electronic apparatus, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement a method of compressing a multiple choice item form as in the first aspect of the embodiments described above.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the embodiment of the invention provides a compression method, a device, a medium and electronic equipment of a multi-option form, which comprises the following steps: acquiring multi-option item form information, wherein the multi-option item form information comprises: character information of the item and a selection result of the item; carrying out first sequencing on items in the multi-option item form information according to the character information of the items, and determining an item sequencing list; performing second sorting on the item selection results according to the item arrangement sequence in the item arrangement list, and determining item selection result sorting information; and compressing the sorting information of the selection results, and outputting the compression results obtained after compression. The technical scheme of the embodiment of the invention can compress the characters of the multiple-choice item form by utilizing the attribute information of the plug-in, thereby improving the warehousing efficiency of a large number of multiple-choice item forms and reducing the probability of warehousing error report.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
FIG. 1 schematically illustrates a flow diagram of a method of compressing a multiple choice item form according to one embodiment of the invention;
FIG. 2 is a schematic diagram illustrating a binary to hexadecimal conversion of a multiple choice item form in accordance with one embodiment of the present invention;
FIG. 3 schematically illustrates a block diagram of an apparatus for compressing a multiple choice item form according to one embodiment of the invention;
FIG. 4 illustrates a schematic structural diagram of a computer system suitable for use with the electronic device to implement an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations or operations have not been shown or described in detail to avoid obscuring aspects of the invention.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
FIG. 1 schematically illustrates a flow diagram of a method for compressing a multiple choice item form according to one embodiment of the invention.
Referring to fig. 1, a method for compressing a multiple-choice item form according to an embodiment of the present invention includes the following steps:
in step S110, multi-choice item form information is acquired.
In an embodiment of the present invention, the multi-choice item form information includes: character information of the item and a selection result of the item.
In an embodiment of the present invention, the multi-line item form information may be a pull-down multi-selection menu, which includes names of the items and selection results of the items, in the background service, the names of the items may be represented by character strings (combination of letters and/or numbers), and the selection results of the items may be represented by numbers 0 and 1 respectively to indicate the selection results of the items that are not selected and the items that are selected.
In step S120, the items in the multi-choice item form information are first sorted according to the character information of the items, and an item sorting list is determined.
In an embodiment of the present invention, the character information of the items is sorted according to a preset character string sorting rule, and an item sorting list is determined.
In one embodiment of the present invention, the ordering of the character information of the items according to the preset character string ordering rule is to arrange the character strings of the items in the alphabetical and numeric order in the forward direction, so as to ensure that the relative positions of the character strings are fixed and do not change, and provide a guarantee for the subsequent compression and decompression algorithms.
In one embodiment of the present invention, the preset string ordering rule may be a Unicode string ordering rule.
In step S130, the selection results of the items are second sorted according to the item arrangement order in the item arrangement list, and item selection result sorting information is determined.
In one embodiment of the invention, before the second sorting of the selection results of the items according to the item sorting order in the item sorting list, the multi-choice item form is detected; when the selection result of the option in the multi-option item form is detected to be selected, the selection result of the option is identified by binary digit 1; when the selection result of the option in the multi-choice item form is detected to be unselected, the selection result of the option is identified by a binary digit 0.
In one embodiment of the invention, each item in the item ordered list is traversed, and the selection result of each item is determined; and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the item binary digit selection results.
In an embodiment of the present invention, the method for performing the second sorting on the selection result of the item is used in relation to a multi-selection pull-down control, and the purpose of the method is to return to a calling end to perform a warehousing operation after the content of the control is selected, and the implementation may be a get method, specifically, by monitoring the selection of the selection control, after the user selects the selection, the code attribute inside the selection control is marked as 1(code is 1), and the unselected code attribute is marked as 0(code is 0) by default, after the user finishes all selections, the get method is called to cycle through all the selections, the code attributes are checked and the values are sequentially arranged and returned, the sequentially arranged selection result sorting information (for example, 10101010) is obtained, and then the selection result sorting information is compressed and other subsequent operations are returned to the calling end.
In step S140, the selection result ranking information is compressed, and the compression result obtained after the compression is output.
In one embodiment of the invention, according to a preset splitting rule, sequentially splitting the sorting information of the selection results of the binary number identifiers to obtain each splitting result; carrying out hexadecimal conversion on each split result according to the split sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers; and determining the sorting information of the selection results identified by the hexadecimal numbers as compression results.
In an embodiment of the invention, firstly, the sorting information of the selection result of the binary number identifier is converted into binary integer, secondly, the binary integer is converted into the sorting information of the selection result of the hexadecimal number identifier, and finally, the sorting information of the selection result of the hexadecimal number identifier is returned to the server for warehousing by calling a value method.
In one embodiment of the present invention, hexadecimal is commonly used in the computer field, because it is less difficult to convert 4 bits (bits) into individual 16-ary digits, wherein 1 byte can be expressed as 2 continuous 16-system digits, every four digits of the sorting information of the selection result marked by the binary digits can be expressed separately, for example, when the sorting information of the selection result identified by the binary number is 1110011011001100, it can be split into 1110, 0110, 1100, 1100 four cells, each cell can be replaced by a character if represented hexadecimal, the character representation of which is equivalent to its original 1/4, the compression ratio is 75%, based on which the compression of a long character string into a short character string can be realized, when entering is carried out, the probability of entering errors caused by overlong character strings is reduced, and the specific algorithm implementation can be as follows:
from the decimal point, the left and right sides are segmented according to 'four bits one segment', wherein, the complement of less than four bits is 0, then, the binary number of the four bits of each segment corresponds to a hexadecimal number, and the conversion relation of binary system to hexadecimal is as follows:
0000–0;
0001–1;
0010–2;
0011–3;
0100–4;
0101–5;
0110–6;
0111–7;
1000–8;
1001–9;
1010–A;
1011–B;
1100–C;
1101–D;
1110–E;
1111–F;
in one embodiment of the present invention, an initialization array length 16 reshape character array may be: {0000, 0001, 0010, 0011, 0100, 0101, 0110, 0111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111}.
In one embodiment of the present invention, for a given binary string "101101", first, every four characters in the binary string are divided into groups, less than four characters are padded with 0, and the string is counted from right to left in groups of four, the first group: 1101, by the second group, only two characters 0 and 1 are present, which are padded with 0, the result after padding is: 0010, matching according to the corresponding conversion relationship to obtain the hexadecimal ordering information: and 2D.
FIG. 2 is a schematic diagram illustrating a binary to hexadecimal conversion of a multiple choice item form in accordance with one embodiment of the present invention.
Referring to fig. 2, the multiple choice item form includes 16 items, where 9 selected items and 7 unselected items are available, and the selection result of binary number identifiers of the multiple choice item form can be obtained according to the sequence from top to bottom: 1110011011001100, 4 bits grouping from right to left yields: 1110, 0110, 1100, 1100; and matching according to the corresponding conversion relation to obtain hexadecimal sequencing information: e6CC, for the compression result, when the character length of each value is 2 bits and the original value is 01, 02, 03, 06, 07, 08, 09(20 characters), the compression result is E6CC (4 characters), and the compression ratio (4)/20 is 20%; when tested in all 1 items 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15 (character 45), the compressibility was 4/45% of about 8.99%; in the character length of 1, the selection items are less than 4, and the compression rate is 400%; when the compression ratio is 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 and 16(38 characters), the compression ratio is 4/38-10.52%; therefore, when the multi-choice item form is too long in the value of the drop-down value, or too many in the check items, the compression storage is applicable, and when the check value is less, the compression can be considered to be closed.
In an embodiment of the present invention, the set method may be adopted to restore the selection result ranking information of the compressed hexadecimal number identifiers, specifically, after the control is used to call the selection result ranking information (e.g. AA) of the hexadecimal number identifiers, the selection result ranking information is restored to the code in the binary form (e.g. 10101010), and then, the control item is selected according to the position of the control item, such as 11011 of the restored binary code, the set method marks them in order with the label marked as selected by 1 and unselected by 0, to restore the user's selection on the multiple choice item form, the set method is the inverse process of the get method, and specific contents may refer to the content related to.
The following describes an embodiment of the apparatus of the present invention, which can be used to perform the above-mentioned compression method for multi-choice forms of the present invention.
FIG. 3 schematically shows a block diagram of an apparatus for compressing a multiple choice item form according to an embodiment of the invention.
Referring to fig. 3, an apparatus 300 for compressing a multiple-choice item form according to an embodiment of the present invention includes:
an obtaining module 301, configured to obtain form information of multiple options, where the form information of multiple options includes: character information of the item and a selection result of the item;
the first ordering module 302 is configured to perform first ordering on items in the multi-choice item form information according to character information of the items, and determine an item ordering list;
the second sorting module 303 is configured to perform second sorting on the selection results of the items according to the item arrangement order in the item arrangement list, and determine item selection result sorting information;
and the compression module 304 is configured to compress the sorting information of the selection result, and output a compression result obtained after compression.
In an embodiment of the present invention, the first sorting module 302 is specifically configured to:
and sorting the character information of the items according to a preset character string sorting rule to determine a project sorting list.
In one embodiment of the present invention, further comprising:
an identification module 305, configured to detect a multi-choice item form; when the selection result of the option in the multi-option item form is detected to be selected, the selection result of the option is identified by binary digit 1; when the selection result of the option in the multi-choice item form is detected to be unselected, the selection result of the option is identified by a binary digit 0.
In an embodiment of the present invention, the second sorting module 303 is specifically configured to:
traversing each item in the item ranking list to determine a selection result of each item;
and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the item binary digit selection results.
In an embodiment of the present invention, the compressing module 304 is specifically configured to:
sequentially splitting the sorting information of the selection results of the binary digital identifiers according to a preset splitting rule to obtain each splitting result; carrying out hexadecimal conversion on each split result according to the split sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers; and determining the sorting information of the selection results identified by the hexadecimal numbers as compression results.
For details that are not disclosed in the embodiment of the apparatus of the present invention, please refer to the above-mentioned compression method of the multiple choice item form of the first aspect of the present invention for the details that are not disclosed in the embodiment of the apparatus of the present invention.
Referring now to FIG. 4, a block diagram of a computer system 400 suitable for use with the electronic device implementing an embodiment of the invention is shown. The computer system 400 of the electronic device shown in fig. 4 is only an example, and should not bring any limitation to the function and the scope of use of the embodiments of the present invention.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for system operation are also stored. The CPU401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as necessary, so that a computer program read out therefrom is mounted into the storage section 408 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The above-described functions defined in the system of the present application are executed when the computer program is executed by a Central Processing Unit (CPU) 401.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present invention may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to implement the method for compressing the multiple choice item form as in the above embodiments.
For example, the electronic device described above may implement as shown in fig. 1: step S110, obtaining form information of multiple options; step S120, performing first sequencing on items in the multi-choice item form information according to the character information of the items, and determining an item sequencing list; step 130, performing second sorting on the selection results of the items according to the item arrangement sequence in the item arrangement list, and determining item selection result sorting information; and 140, compressing the sorting information of the selection results and outputting the compression results obtained after compression.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A method for compressing a multiple-choice item form, comprising:
acquiring multi-option item form information, wherein the multi-option item form information comprises: character information of the item and a selection result of the item;
carrying out first sequencing on the items in the multi-choice item form information according to the character information of the items to determine an item sequencing list;
performing second sorting on the selection results of the items according to the item arrangement sequence in the item arrangement list, and determining the sorting information of the item selection results;
compressing the sorting information of the selection results, and outputting a compression result obtained after compression;
wherein, the first sorting of the items in the multi-choice item form information is performed according to the character information of the items, and the determining of the item sorting list comprises:
sorting the character information of the items according to a preset character string sorting rule to determine a project sorting list; and the preset character string sorting rule is a Unicode character string sorting rule.
2. The method of compressing a multiple-choice item form according to claim 1, wherein before the second sorting of the selection results of the items according to the item ranking order in the item ranking list, the method further comprises:
detecting the multi-option form;
when detecting that the selection result of the option in the multi-option item form is selected, identifying the selection result of the option by a binary digit 1;
and when the selection result of the option in the multi-choice item form is detected to be unselected, identifying the selection result of the option by a binary digit 0.
3. The method of claim 1, wherein the second sorting of the selection results of the items according to the order of the arrangement of the items in the ordered list of items, and determining the ordering information of the selection results of the items comprises:
traversing each item in the item ranking list to determine a selection result of each item;
and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the binary digit selection results of the items.
4. The method of claim 1, wherein compressing the selection result ranking information comprises:
sequentially splitting the sorting information of the selection results of the binary digital identifiers according to a preset splitting rule to obtain each splitting result;
carrying out hexadecimal conversion on each splitting result according to the splitting sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers;
and determining the sorting information of the selection results of the hexadecimal digital identifications as the compression results.
5. An apparatus for compressing a multiple choice item form, comprising:
the acquisition module is used for acquiring the form information of the multiple options, wherein the form information of the multiple options comprises: character information of the item and a selection result of the item;
the first sequencing module is used for carrying out first sequencing on the items in the multi-option item form information according to the character information of the items to determine an item sequencing list;
the second sorting module is used for carrying out second sorting on the selection results of the projects according to the project sorting sequence in the project sorting list and determining sorting information of the selection results of the projects;
the compression module is used for compressing the sorting information of the selection results and outputting the compression results obtained after compression;
wherein, the first sequencing module is specifically configured to:
sorting the character information of the items according to a preset character string sorting rule to determine a project sorting list; and the preset character string sorting rule is a Unicode character string sorting rule.
6. The apparatus for compressing multiple choice forms of claim 5, further comprising:
the identification module is used for detecting the multi-option form; when detecting that the selection result of the option in the multi-option item form is selected, identifying the selection result of the option by a binary digit 1; and when the selection result of the option in the multi-choice item form is detected to be unselected, identifying the selection result of the option by a binary digit 0.
7. The apparatus for compressing multiple choice items form of claim 5, wherein the second sorting module is specifically configured to:
traversing each item in the item ranking list to determine a selection result of each item;
and sequencing the binary digits of the item selection results according to the item sequence in the item sequence list, and determining the sequencing information of the binary digit selection results of the items.
8. The apparatus of claim 5, wherein the compression module is specifically configured to:
sequentially splitting the sorting information of the selection results of the binary digital identifiers according to a preset splitting rule to obtain each splitting result; carrying out hexadecimal conversion on each splitting result according to the splitting sequence to obtain the sorting information of the selection results of the hexadecimal digital identifiers; and determining the sorting information of the selection results of the hexadecimal digital identifications as the compression results.
9. A computer-readable medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out a method of compressing a multiple choice item form as claimed in any one of claims 1 to 4.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of compressing a multiple choice item form as claimed in any one of claims 1 to 4.
CN201811014462.3A 2018-08-31 2018-08-31 Compression method, device, medium and electronic equipment for multi-option form Active CN109033467B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811014462.3A CN109033467B (en) 2018-08-31 2018-08-31 Compression method, device, medium and electronic equipment for multi-option form

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811014462.3A CN109033467B (en) 2018-08-31 2018-08-31 Compression method, device, medium and electronic equipment for multi-option form

Publications (2)

Publication Number Publication Date
CN109033467A CN109033467A (en) 2018-12-18
CN109033467B true CN109033467B (en) 2020-09-29

Family

ID=64622713

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811014462.3A Active CN109033467B (en) 2018-08-31 2018-08-31 Compression method, device, medium and electronic equipment for multi-option form

Country Status (1)

Country Link
CN (1) CN109033467B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112395830A (en) * 2019-07-31 2021-02-23 腾讯科技(深圳)有限公司 Form processing method based on Wan Guo code and related device
CN114330261A (en) * 2021-12-30 2022-04-12 江苏银承网络科技股份有限公司 Form data checking method, checking device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1476576A (en) * 2000-11-25 2004-02-18 ��������³���о����޹�˾ Method and system for online buying
WO2013039420A2 (en) * 2011-09-16 2013-03-21 Andrey Evgenevich Vasilev Relational database and operation mode of relational database
CN103514159A (en) * 2012-06-14 2014-01-15 阿里巴巴集团控股有限公司 Method, system and device for processing form template
CN105227634A (en) * 2015-08-31 2016-01-06 徐州工程学院 A kind of compression of the binary data based on Residential soil and encryption method
CN105302550A (en) * 2015-10-12 2016-02-03 江苏中威科技软件系统有限公司 Method and system for converting page into layout data stream file

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1476576A (en) * 2000-11-25 2004-02-18 ��������³���о����޹�˾ Method and system for online buying
WO2013039420A2 (en) * 2011-09-16 2013-03-21 Andrey Evgenevich Vasilev Relational database and operation mode of relational database
CN103514159A (en) * 2012-06-14 2014-01-15 阿里巴巴集团控股有限公司 Method, system and device for processing form template
CN105227634A (en) * 2015-08-31 2016-01-06 徐州工程学院 A kind of compression of the binary data based on Residential soil and encryption method
CN105302550A (en) * 2015-10-12 2016-02-03 江苏中威科技软件系统有限公司 Method and system for converting page into layout data stream file

Also Published As

Publication number Publication date
CN109033467A (en) 2018-12-18

Similar Documents

Publication Publication Date Title
CN108540826B (en) Bullet screen pushing method and device, electronic equipment and storage medium
CN110580308B (en) Information auditing method and device, electronic equipment and storage medium
CN115061721A (en) Report generation method and device, computer equipment and storage medium
CN111176996A (en) Test case generation method and device, computer equipment and storage medium
CN109871311B (en) Method and device for recommending test cases
CN109033467B (en) Compression method, device, medium and electronic equipment for multi-option form
CN109828859B (en) Mobile terminal memory analysis method and device, storage medium and electronic equipment
CN109872230B (en) Test method and device of financial data analysis system, medium and electronic equipment
CN112148766A (en) Method and system for sampling data using artificial neural network model
CN110688111A (en) Configuration method, device, server and storage medium of business process
CN111898340A (en) File processing method and device and readable storage medium
CN113010471A (en) File conversion method, file conversion device, storage medium and electronic equipment
CN113609195A (en) Report generation method, report generation device, electronic equipment and storage medium
US20180189329A1 (en) Rule based decisioning on metadata layers
CN115080154A (en) Page display method and device, storage medium and electronic equipment
CN112685397A (en) Method, device, equipment and storage medium for verifying data cleaning result
CN112818267A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN115964269A (en) Test processing method and device, electronic equipment and storage medium
US20230229708A1 (en) Recommendation system
CN111079185A (en) Database information processing method and device, storage medium and electronic equipment
CN110704617B (en) News text classification method, device, electronic equipment and storage medium
CN118133794B (en) Table configuration method, apparatus, device and storage medium
CN110750563A (en) Multi-model data processing method, system, device, electronic equipment and storage medium
CN109656821A (en) Test method and device
CN112287097B (en) Method and device for analyzing markup language text, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant after: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.

Address before: Room 221, 2nd floor, Block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Applicant before: BEIJING JINGDONG FINANCIAL TECHNOLOGY HOLDING Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee before: Jingdong Digital Technology Holding Co.,Ltd.

CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Daxing District, Beijing, 100176

Patentee after: Jingdong Digital Technology Holding Co.,Ltd.

Address before: Room 221, 2 / F, block C, 18 Kechuang 11th Street, Beijing Economic and Technological Development Zone, 100176

Patentee before: JINGDONG DIGITAL TECHNOLOGY HOLDINGS Co.,Ltd.