Method and device for processing form information
By using bitmap storage and query commands to process form information, the problem of high resource consumption in large-scale form data processing is solved, and efficient data storage and querying are achieved.
Patent Information
- Application Number
- CN202310521312.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-10
- Publication Date
- 2024-11-12
AI Technical Summary
When the number of users, forms, and input data is large, and the query conditions are complex, existing methods consume a lot of memory and computing resources, resulting in poor data service performance and affecting user experience.
The form information is stored in bitmap format using bitmap storage instructions, and the corresponding input information and user identifier are retrieved using bitmap query instructions. Logical operations are performed directly through the bitmap format, reducing resource consumption and processing complexity.
It improves the efficiency of storing and retrieving form information, reduces resource consumption, and enhances data processing performance and user experience.
Smart Images

Figure CN118939683A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of application development technology, and in particular to a method and device for processing form information. Background Art
[0002] In some information processing pages of an application, there are usually multiple related forms. Each form provides multiple options for users to enter corresponding information. By storing the information entered by the user through the form, the user's corresponding form information is collected to perform subsequent information analysis.
[0003] At present, databases are usually used to store the input information of each user for the form, and query results are obtained from the database according to the information query conditions. However, when the number of users is large, the number of forms is large, the amount of input form information data is large, and especially when the query conditions are complex, the existing methods have the problem of consuming large memory resources and computing resources, which reduces the performance of data services, resulting in low data processing efficiency and affecting user experience. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method and device for processing form information, which can use bitmap storage instructions to store multiple received form information in bitmap format, and when a query request for form information is received, use bitmap query instructions to query input information corresponding to the form information and a user identifier associated with the input information. The embodiment of the present invention reduces resource consumption and the complexity of processing form information by storing and querying form information based on a bitmap format, thereby improving the efficiency of processing form information.
[0005] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, a method for processing form information is provided, characterized in that it includes: receiving multiple page information sent by a client, the page information including multiple form information, user identifiers corresponding to the form information, and input information of the user identifier for each form information; for each form information, converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction, and storing the input parameters in a bitmap format through the bitmap storage instruction; and when a query request for the form information is received, querying the input information corresponding to the form information and the user identifier associated with the input information using a bitmap query instruction.
[0006] Optionally, the bitmap storage instruction includes a unique key, an offset, and a key value;
[0007] The method of converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction includes: converting the form information into an input parameter corresponding to the unique key; converting the user identifier into an input parameter corresponding to the offset; and converting the input information of the form information into an input parameter corresponding to the key value.
[0008] Optionally, converting the user identifier into an input parameter corresponding to the offset includes: obtaining an operation sequence of multiple users corresponding to the multiple user identifiers on a form in a page, and determining an input parameter of the offset for each user identifier based on the operation sequence of the multiple users on the form.
[0009] Optionally, the use of a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information includes: converting the query conditions included in the query request into query parameters required by the bitmap query instruction; the bitmap query instruction uses the query parameters to query the input information corresponding to the form information and the user identifier associated with the input information.
[0010] Optionally, the query corresponds to the input information of the form information and the user identifier associated with the input information, including: when the query parameters include at least two unique keys, key values corresponding to the unique keys, and logical operators between at least two of the unique keys, querying the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information.
[0011] Optionally, before querying the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information, it further includes: determining a logical operation order for the at least two logical operators; querying the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information includes: determining the ranking of each of the logical operators in the logical operation order; for the first logical operator ranked first, performing the following operations: determining two first unique keys directly associated with the first logical operator; querying the input information in the form information that satisfies the two first unique keys and the first logical operator and one or more user identifiers associated with the input information; generating an intermediate query set according to the one or more user identifiers associated with the input information.
[0012] Optionally, the querying of the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information also includes: for a second logical operator other than the first logical operator in the logical operation order, performing the following operations: determining an intermediate query set of a previous logical operator corresponding to the second logical operator and a second unique key directly associated with the second logical operator; querying the intermediate query set in the form information that satisfies the previous logical operator and the input information of the second unique key and one or more user identifiers associated with the input information; determining whether the second logical operator is the last one in the logical operation order, and if not, generating an intermediate query set based on the intermediate query set that satisfies the previous logical operator and one or more user identifiers associated with the input information of the second unique key.
[0013] Optionally, the method for processing form information further includes: storing the correspondence between the user identifier and the offset; using a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information, including: using a bitmap query instruction to query the input information corresponding to the form information and the bitmap format value corresponding to the user identifier associated with the input information; according to the correspondence between the user identifier and the offset, converting each of the bitmap format values into a user identifier in text format.
[0014] Optionally, storing the input parameters in a bitmap format through the bitmap storage instruction includes: storing the input parameters in a bitmap format to a cache through the bitmap storage instruction; querying the input information corresponding to the form information and the user identifier associated with the input information using a bitmap query instruction includes: querying the input information corresponding to the form information and the user identifier associated with the input information from the cache using a bitmap query instruction.
[0015] To achieve the above object, according to a second aspect of an embodiment of the present invention, a device for processing form information is provided, characterized in that it includes: an information receiving module, an information storage module and an information query module; wherein:
[0016] The information receiving module is used to receive a variety of page information sent by the client, wherein the page information includes a variety of form information, a user identifier corresponding to the form information, and input information of the user identifier for each of the form information;
[0017] The storage information module is used for converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction for each of the form information, and storing the input parameters in a bitmap format through the bitmap storage instruction;
[0018] The query information module is used to query the input information corresponding to the form information and the user identification associated with the input information using a bitmap query instruction when a query request for any form information is received.
[0019] Optionally, the bitmap storage instruction in the device for processing form information includes a unique key, an offset, and a key value;
[0020] The method of converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction includes: converting the form information into an input parameter corresponding to the unique key; converting the user identifier into an input parameter corresponding to the offset; and converting the input information of the form information into an input parameter corresponding to the key value.
[0021] Optionally, the device for processing form information is used to convert the user identifier into an input parameter corresponding to the offset, including: obtaining the operation sequence of multiple users corresponding to the multiple user identifiers on the form in the page, and determining the input parameter of the offset for each user identifier based on the operation sequence of the multiple users on the form.
[0022] Optionally, the device for processing form information is used to use a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information, including: converting the query conditions included in the query request into query parameters required by the bitmap query instruction; the bitmap query instruction uses the query parameters to query the input information corresponding to the form information and the user identifier associated with the input information.
[0023] Optionally, the device for processing form information is used to query input information corresponding to the form information and a user identifier associated with the input information, including: when the query parameters include at least two unique keys, key values corresponding to the unique keys, and a logical operator between at least two of the unique keys, querying the input information in the form information that satisfies the logical operator between at least two of the unique keys and one or more user identifiers associated with the input information.
[0024] Optionally, the device for processing form information, before querying the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information, further includes: determining a logical operation order for the at least two logical operators; the querying the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information includes: determining the ranking of each of the logical operators in the logical operation order; performing the following operations for the first logical operator ranked first: determining two first unique keys directly associated with the first logical operator; querying the input information in the form information that satisfies the two first unique keys and the first logical operator and one or more user identifiers associated with the input information; generating an intermediate query set based on the one or more user identifiers associated with the input information.
[0025] Optionally, the device for processing form information is used to query the input information in the form information that satisfies the logical operators between at least two of the unique keys and one or more user identifiers associated with the input information, and also includes: for a second logical operator other than the first logical operator in the logical operation order, performing the following operations: determining an intermediate query set of a previous logical operator corresponding to the second logical operator and a second unique key directly associated with the second logical operator; querying the form information for the intermediate query set that satisfies the previous logical operator and the input information of the second unique key and one or more user identifiers associated with the input information; determining whether the second logical operator is the last one in the logical operation order, and if not, generating an intermediate query set based on the intermediate query set that satisfies the previous logical operator and one or more user identifiers associated with the input information of the second unique key.
[0026] Optionally, the device for processing form information is also used to store the correspondence between the user identifier and the offset; use a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information, including: use a bitmap query instruction to query the input information corresponding to the form information and the bitmap format value corresponding to the user identifier associated with the input information; according to the correspondence between the user identifier and the offset, convert each of the bitmap format values into a user identifier in text format.
[0027] Optionally, the device for processing form information is used to store the input parameters in a bitmap format through the bitmap storage instruction, including: storing the input parameters in a bitmap format to a cache through the bitmap storage instruction; using a bitmap query instruction to query the input information corresponding to the form information and a user identifier associated with the input information, including: using a bitmap query instruction to query the input information corresponding to the form information and a user identifier associated with the input information from the cache.
[0028] To achieve the above-mentioned purpose, according to the third aspect of an embodiment of the present invention, there is provided an electronic device for processing form information, characterized in that it includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods described in the above-mentioned methods for processing form information.
[0029] To achieve the above-mentioned purpose, according to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, characterized in that when the program is executed by a processor, any method as described in the above-mentioned method for processing form information is implemented.
[0030] An embodiment of the above invention has the following advantages or beneficial effects: it is capable of using bitmap storage instructions to store multiple received form information in bitmap format, and when a query request for form information is received, the bitmap query instruction is used to query the input information corresponding to the form information and the user identifier associated with the input information. The embodiment of the present invention reduces resource consumption and the complexity of processing form information by storing and querying form information based on a bitmap format, thereby improving the efficiency of processing form information.
[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0033] Figure 1 It is a flowchart of a method for processing form information provided by an embodiment of the present invention;
[0034] Figure 2 It is a schematic diagram of a process of querying form information provided by an embodiment of the present invention;
[0035] Figure 3 It is a structural diagram of a device for processing form information provided by an embodiment of the present invention;
[0036] Figure 4 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0037] Figure 5 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0039] It should be noted that the collection, collection, updating, analysis, processing, use, transmission, storage and other aspects of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken for user personal information to prevent illegal access to user personal information data and maintain the security of user personal information, network security and national security.
[0040] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0041] After collecting the form information, we will de-identify the form information through technical means; when displaying the form information and user identification, we will desensitize your information by using methods including de-identification or anonymization to protect the security of your information.
[0042] In order to count the usage of our products / services, we will aggregate, analyze and use the technically processed user data and share the processed statistical information with third parties. We will use secure encryption technology and other methods to ensure that the recipient of the information cannot re-identify a specific individual.
[0043] like Figure 1 As shown, an embodiment of the present invention provides a method for processing form information, which may include the following steps:
[0044] Step S101: receiving a variety of page information sent by a client, wherein the page information includes a variety of form information, user identifiers corresponding to the form information, and input information of the user identifier for each of the form information.
[0045] Specifically, in multiple application scenarios, multiple forms can be provided through the client page, and each form provides multiple options for users to enter corresponding information. By storing the information entered by the user through the form, the corresponding form information of the user is collected to perform subsequent information analysis, for example: providing a page containing multiple forms corresponding to the user's answer items, providing a page containing multiple forms of options such as user evaluation and data survey, providing a page containing multiple forms of one or more characteristic information of the user, etc.; the following takes the form with characteristic information of a certain disease as an example to illustrate the multiple form information contained in the page, the user identifier corresponding to the form information, and the input information of the user identifier for each of the form information.
[0046] Furthermore, the form information may include a form identifier, one or more topic identifiers included in the form identifier, and one or more options corresponding to the topic identifiers. For example, page A (for a certain disease type, such as disease A) provided by the client includes three forms, and the form information of the three forms includes:
[0047] Form A: Standard review of patients with disease A / Question 1: The patient has obvious mental and behavioral abnormalities and emotional disorders / Options: a: Yes, b: No
[0048] Form B: Symptom Assessment Sheet for Disease A / Question 1: Extent of Symptom 1 / Options: a: None, b: Very Mild, c: Mild, d: Moderate, e: Severe, f: Severe
[0049] Form C: Quality of life assessment form for patients with disease A / Question 1: Can you concentrate? / Options: a: not at all, b: a little, c: moderately, d: a lot, e: extremely
[0050] For example, user A's input information for the options of question 1 in form A is a, user B's input information for the options of question 1 in form A is b, and user C's input information for the options of question 1 in form C is c; wherein user A, user B, and user C are user identifiers, and a, b, and c are input information of the user identifiers for the corresponding form information.
[0051] For the same title of the same form, the input information corresponding to different user identifiers may be different, that is, the input information of each user identifier of the same title of the same form is obtained. Similarly, the user identifier corresponding to the form information of the form on the page and the input information of the user identifier for each form information are obtained (stored). For example, the number of users who input option a for form A title 1 and the user identifier of each user are counted. Different forms can have one or more associations. It can be seen that when the number of users is large, the number of forms, titles, and options is large, and the forms have multiple associations, using the existing method of storing text to store the information of each form to the data source will waste storage resources; and when querying the form information subsequently, text queries must be used to query and process the various query conditions separately, resulting in low efficiency in processing form information.
[0052] Step S102: for each piece of form information, convert the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction, and store the input parameters in a bitmap format through the bitmap storage instruction.
[0053] Specifically, for each piece of form information, the form information, the input information of the form information and the user identifier are converted into input parameters of a bitmap storage instruction; and the input parameters are stored in a bitmap format through the bitmap storage instruction.
[0054] Preferably, storing the input parameters in a bitmap format through the bitmap storage instruction includes: storing the input parameters in a bitmap format to a cache through the bitmap storage instruction; and storing the form information in the cache to perform subsequent query operations, thereby improving the storage and query efficiency of processing the form information and saving resource consumption.
[0055] In an embodiment of the present invention, for example, a bitmap storage instruction is setbit key offset value, wherein the input parameters of the bitmap storage instruction correspond to key, offset, and value; that is, the input parameters are stored in a bitmap format using setbit key offset value; wherein the bitmap format may be a binary data format or a hexadecimal data format that can be converted into binary, etc.
[0056] Furthermore, in the setbit key offset value bitmap storage instruction, key is a unique key, offset is an offset, and value is a key value; that is, the bitmap storage instruction includes a unique key, an offset, and a key value.
[0057] Furthermore, the form information, the input information of the form information and the user identifier are converted into input parameters of a bitmap storage instruction, including: converting the form information into an input parameter corresponding to the unique key; converting the user identifier into an input parameter corresponding to the offset; and converting the input information of the form information into an input parameter corresponding to the key value.
[0058] The following still takes Form A as an example to explain separately, for example:
[0059] Form A: Standard review of patients with disease A / Question 1: The patient has obvious mental and behavioral abnormalities and emotional disorders / Options: a: Yes, b: No;
[0060] The form information of form A is converted into input parameters corresponding to a unique key (key), for example: the data format of key is: unique identifier of disease type: form identifier: title identifier: option identifier, and the information obtained by form A after conversion is: 1001:1:1:2, wherein 1001 is the unique identifier of the disease type contained in the page, the first "1" is the form identifier corresponding to form A, the second "1" is the title identifier of title 1 contained in form A, and 2 is the option identifier of title 1 contained in form A; it can be understood that the method of converting the form information into an input parameter corresponding to the unique key can also directly convert the character string corresponding to the form information into a bitmap format code, and use the code as the input parameter corresponding to the key. The present invention does not limit the format of the unique key and the specific data value.
[0061] There are usually multiple forms on a page, and the topics contained in the forms are usually associated with each other. Therefore, by converting the form information into a unique key to store the related form information, the same format of input parameters is generated for the topic, options and other information of each form, so that when querying the form, the query can be directly performed based on the unique key, achieving the beneficial effect of directly querying multiple forms through the key.
[0062] Further, the user identifier is converted into an input parameter corresponding to the offset. For example, for form A, the offset of user A is 5, and 5 is the input parameter of the offset. The method for confirming the offset corresponding to the user identifier is determined according to the operation sequence of the user input information; for example: for title A of form A, user A is the 5th user in the sequence of operating form A in all operation pages, then the offset corresponding to user A is determined to be 5. Similarly, the offset for the form is determined for each user identifier according to the form operation sequence of multiple users, that is, the conversion of the user identifier into an input parameter corresponding to the offset includes: obtaining the operation sequence of multiple users corresponding to the multiple user identifiers for the form in the page, and determining the input parameter of the offset for each user identifier according to the operation sequence of the multiple users for the form. It can be understood that the same user can operate different forms in different orders, that is, the offsets associated with different forms can be different.
[0063] The input information of the form information is converted into an input parameter corresponding to the key value; for example, if the input information of user A for form A is a, and the value corresponding to a is 1, then "a" is converted into an input parameter "1" corresponding to value (ie, key value).
[0064] Based on the above example, the bitmap storage instruction (including input parameters) is determined as follows:
[0065] setbit 1001:1:1:2 5 1
[0066] Among them, 1001:1:1:2 is the input parameter corresponding to the unique key key, 5 is the input parameter corresponding to the offset offset, and 1 is the input parameter corresponding to the key value value;
[0067] It can be seen that each input parameter is stored in a bitmap format through the bitmap storage instruction, thereby storing the input information of user A for form A. Similarly, the input information associated with each form information received from the page and the user information associated with the input information are stored.
[0068] Step S103: when a query request for form information is received, the input information corresponding to the form information and the user identifier associated with the input information are queried using a bitmap query instruction.
[0069] Specifically, the query request for form information may be a query request for one form or a query request for multiple forms.
[0070] Furthermore, in a case where the input information of the form information and a user identifier associated with the input information are stored in a cache, a bitmap query instruction is used to query the input information corresponding to the form information and the user identifier associated with the input information, including: querying the input information corresponding to the form information and the user identifier associated with the input information from the cache using a bitmap query instruction.
[0071] In an embodiment of the present invention, a bitmap query instruction is, for example, bitop and result key1key2; specifically, taking the unique key key1 corresponding to form A and the unique key key2 corresponding to form B as examples, if the query conditions of the query request include querying the input information of the form information that satisfies both key1 and key2 and the user identifier associated with the input information, then bitop and result key1 key2 can be used to obtain the query result, wherein "and" is a logical operator, indicating an "and" operation. It can be understood that only the input information of a certain form and the user identifier associated with the input information can be queried. In the case of querying the input information of a form and the user identifier associated with the input information, a logical operator is not required, for example, the bitmap query instruction is bitop result key1.
[0072] Furthermore, "result" is, for example, a query result obtained by a bitmap query instruction. The query result may include a value in a bitmap format corresponding to a user identifier. Further, the bitcount result instruction may be used to obtain the number of users that meet the query conditions. The get result may also be used to obtain a hexadecimal number corresponding to a set of user identifiers that meet the query conditions, and the offset corresponding to the user identifier may be obtained by parsing the hexadecimal number to obtain the corresponding binary number, thereby further determining the user identifier and other user information (for example, including user A, user B...user N, etc.) based on the correspondence between the offset and the user identifier. It can be understood that while generating an offset for a user according to the form operation sequence, the correspondence between the user identifier and the offset can be stored; so that the user identifier corresponding to the offset can be determined by querying the offset contained in the data query result in bitmap format; that is, an embodiment of the present invention also includes: storing the correspondence between the user identifier and the offset; using a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information, including: using a bitmap query instruction to query the input information corresponding to the form information and the bitmap format value (for example, hexadecimal or binary) corresponding to the user identifier associated with the input information; according to the correspondence between the user identifier and the offset, converting each of the bitmap format values into a user identifier in text format.
[0073] It can be seen that the embodiments of the present invention store form information in a bitmap format, and query the input information corresponding to the form information and the user identifier associated with the input information through data in a bitmap format. When the query conditions include logical operations, one or more logical operations can be directly performed on data based on the bitmap format, compared with other data formats (such as text, etc.), the complexity of performing logical operations on the execution data in the query form data is greatly reduced, thereby reducing the consumption of storage resources and improving the storage efficiency and query efficiency of the form information.
[0074] like Figure 2 As shown, an embodiment of the present invention provides a process for querying form information, which may include the following steps:
[0075] Step S201: converting the query conditions included in the query request into query parameters required by the bitmap query instruction; the bitmap query instruction uses the query parameters to query the input information corresponding to the form information and the user identifier associated with the input information.
[0076] Specifically, the query request may include query conditions, for example, the query conditions are: all user identifiers whose input information is option "a" for question 1 of form A or option "c" for question 1 of form B, or all user identifiers whose input information is option "d" for question 1 of form B and option "e" for question 1 of form C.
[0077] Further, the query condition included in the query request is converted into the query parameters required by the bitmap query instruction. For example, the query condition is all user identifiers whose input information is option "a" for question 1 of form A or option "c" for question 1 of form B, the unique key corresponding to option "a" for question 1 of form A is key1, and the unique key corresponding to option "c" for question 1 of form B is key2. According to step S102, the description of the input parameters of the unique key is determined, for example, the input parameters of key1 are obtained as 1001:1:1:1, and the input parameters of key2 are obtained as 1001:2:1:4.
[0078] Furthermore, the bitmap query instruction uses the query parameter to query the input information corresponding to the form information and the user identifier associated with the input information; the bitmap query instruction is, for example, bitop and resultkey1 key2. The query parameter is included, and the input information corresponding to the form information and the user identifier associated with the input information are queried through the bitmap query instruction and the query parameter, for example, "result" represents the input information corresponding to the form information and the user identifier associated with the input information.
[0079] Step S202: when the query parameters include at least two unique keys, key values corresponding to the unique keys, and logical operators between at least two of the unique keys, determine a logical operation order for the at least two logical operators.
[0080] Specifically, in an embodiment of the present invention, the query condition may include a logical operation between key values of multiple unique keys, and the logical operation is, for example, any of logical AND, logical OR, logical NOT, and logical XOR; that is, when the query parameter includes at least two unique keys, key values corresponding to the unique keys, and logical operators between at least two of the unique keys, a logical operation order is determined for the at least two logical operators. It can be understood that there is a logical operation order between multiple logical operations, and the embodiment of the present invention improves the efficiency of querying form information by determining the logical operation order for the at least two logical operators and automatically determining the query order by judging the logical operation order.
[0081] Step S203: Determine the ranking of each of the logical operators in the logical operation sequence.
[0082] Specifically, the logical operation sequence determines the ranking of each of the logical operators in the query condition in the logical operation sequence.
[0083] For example, the query conditions include: key3 or key1 and key2, where "and" represents the AND operation and "or" represents the OR operation. Then, according to the logical operation order, the and operation is performed first and then the or operation is performed. For another example, the query conditions include: (key3 or key1)and key2, then the determined logical operation order is to perform the or operation first and then the and operation. Further, after determining the order of the logical operations included in the query conditions, the ranking of each logical operator is determined.
[0084] Step S204: Determine whether the current logical operator is ranked first, if so, execute step S205, otherwise execute step S206.
[0085] Specifically, after determining the ranking of each logical operator in the logical operation order, determine whether the current logical operator is ranked first, that is, determine whether the current logical operator is the logical operator that needs to be operated first. If so, execute step S205, otherwise execute step S206.
[0086] Step S205: Determine two first unique keys directly associated with the first logical operator; query the form information for input information that satisfies the two first unique keys and the first logical operator and one or more user identifiers associated with the input information; generate an intermediate query set based on one or more user identifiers associated with the input information.
[0087] Specifically, taking "key3 or key1 and key2" as an example, it can be seen that according to the order of logical operations, the first logical operator ranked first is determined to be "and", then the two first unique keys directly associated with the first logical operator are determined to be key1 and key2, and the query form information is executed to satisfy one or more user identifiers associated with the input information of "key1" and "key2", for example, the query instruction is as follows: bitop and tmpkey1 key1 key2, where tmpkey1 is an intermediate query set that satisfies "key1 and key2", that is, the intermediate query set is generated according to one or more user identifiers associated with the input information.
[0088] Step S206: Determine the intermediate query set of the previous logical operator corresponding to the second logical operator and the second unique key directly associated with the second logical operator; query the form information for input information that satisfies the intermediate query set of the previous logical operator and the second unique key, as well as one or more user identifiers associated with the input information.
[0089] Specifically, in an embodiment of the present invention, the second logical operator is one or more other logical operators that are not ranked first in the logical operation sequence.
[0090] Still taking "key3 or key1 and key2" as an example, where the determined second logical operator is "or", the previous logical operator is "and", the intermediate query set of the previous logical operator is tmpkey1, and the second unique key directly associated with the second logical operator is key3, the following instruction can be used to query the intermediate query set that satisfies the previous logical operator and the input information of the second unique key in the form information and one or more user identifiers associated with the input information, bitop or tmpkey2 tmpkey1 key3; where tmpkey2 is the operation result of the second logical operator.
[0091] Step S207: determine whether the second logical operator is the last one in the ranking, if so, generate a query result for the query request; otherwise, continue to execute step S208.
[0092] Specifically, determine whether the current second logical operator is the last one in the ranking, that is, determine whether there are logical operators and unique keys that have not been operated. If the current second logical operator is the last one in the ranking, the query result obtained based on the current second logical operator and unique key is the query result for the query request.
[0093] Step S208: Generate an intermediate query set according to the intermediate query set satisfying the previous logical operator and one or more user identifiers associated with the input information of the second unique key.
[0094] Specifically, when it is determined that the current second logical operator is not the last in the ranking, an intermediate query set is generated based on the intermediate query set that satisfies the previous logical operator and one or more user identifiers associated with the input information of the second unique key to perform the next logical operation.
[0095] It can be seen from the steps S201 to S208 that the embodiment of the present invention automatically parses the various parameters of the query conditions in the query request based on the stored form information in bitmap format and the corresponding input information, user identification and other information, and loops to obtain each logical operator and the corresponding query parameter based on the logical operation order contained in the query condition to generate one or more bitmap query instructions, thereby providing the client with query results for the query request for the form information. Since one or more logical operations can be directly performed on data based on the bitmap format, compared with other data formats (such as text, etc.), the complexity of performing logical operations on the execution data in the query form data is greatly reduced, the efficiency of querying the form information is improved, and the complexity of querying the form information is reduced.
[0096] like Figure 3 As shown, an embodiment of the present invention provides a device 300 for processing form information, including: an information receiving module 301, an information storing module 302 and an information query module 303;
[0097] in,
[0098] The information receiving module 301 is used to receive various page information sent by the client.
[0099] The page information includes a variety of form information, a user identifier corresponding to the form information,
[0100] The user identification input information for each of the form information;
[0101] The storage information module 302 is used to store the table information for each form information.
[0102] The single information, the input information of the form information and the user identification are converted into a bitmap storage
[0103] An input parameter of the instruction, wherein the input parameter is stored in a bitmap format by the bitmap storage instruction;
[0105] The query information module 303 is used to receive a query request for any form information.
[0106] In the case of a request, a bitmap query instruction is used to query the input information corresponding to the form information.
[0107] and a user identifier associated with the input information.
[0108] An embodiment of the present invention also provides an electronic device for processing form information, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in any of the above embodiments.
[0109] An embodiment of the present invention further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in any of the above embodiments is implemented.
[0110] Figure 4 An exemplary system architecture 400 is shown to which the method for processing form information or the apparatus for processing form information according to the embodiments of the present invention can be applied.
[0111] like Figure 4 As shown, system architecture 400 may include terminal devices 401, 402, 403, network 404 and server 405. Network 404 is used to provide a medium for communication links between terminal devices 401, 402, 403 and server 405. Network 404 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0112] Users can use terminal devices 401, 402, 403 to interact with server 405 through network 404 to receive or send messages, etc. Various client applications can be installed on terminal devices 401, 402, 403, such as electronic mall client applications, web browser applications, search applications, data collection and processing clients, etc.
[0113] The terminal devices 401 , 402 , and 403 may be various electronic devices having a display screen and supporting various client applications, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0114] The server 405 may be a server that provides various services, such as a background management server that provides support for client applications used by users using the terminal devices 401, 402, and 403. The background management server may process the query request for the received form information, and feed back the result corresponding to the input information of the form information and the user identification associated with the input information to the terminal device.
[0115] It should be noted that the method for processing form information provided in the embodiment of the present invention is generally executed by the server 405 , and accordingly, the device for processing form information is generally disposed in the server 405 .
[0116] It should be understood that Figure 4 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0117] Reference below Figure 5 , which shows a schematic diagram of the structure of a computer system 500 of a terminal device suitable for implementing an embodiment of the present invention. Figure 5 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0118] like Figure 5 As shown, the computer system 500 includes a central processing unit (CPU) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the system 500 are also stored. The CPU 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0119] The following components are connected to the I / O interface 505: an input section 506 including a keyboard, a mouse, etc.; an output section 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 508 including a hard disk, etc.; and a communication section 509 including a network interface card such as a LAN card, a modem, etc. The communication section 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the I / O interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage section 508 as needed.
[0120] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the central processing unit (CPU) 501, the above-mentioned functions defined in the system of the present invention are executed.
[0121] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0122] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0123] The modules and / or units involved in the embodiments of the present invention may be implemented by software or hardware. The modules and / or units described may also be set in a processor, for example, they may be described as: a processor includes an information receiving module, an information storage module, and an information query module; wherein the names of these modules do not constitute a limitation on the modules themselves in certain circumstances, for example, the information receiving module may also be described as a "module for receiving various page information sent by a client".
[0124] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently and not be assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: receiving multiple page information sent by a client, the page information includes multiple form information, user identifiers corresponding to the form information, and input information of the user identifier for each form information; for each form information, converting the form information, the input information of the form information, and the user identifier into input parameters of a bitmap storage instruction, and storing the input parameters in a bitmap format through the bitmap storage instruction; when receiving a query request for the form information, using the bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information.
[0125] An embodiment of the present invention can use a bitmap storage instruction to store multiple forms of information received in a bitmap format, and when a query request for form information is received, use a bitmap query instruction to query input information corresponding to the form information and a user identifier associated with the input information. The embodiment of the present invention reduces resource consumption and the complexity of processing form information by storing and querying form information based on a bitmap format, thereby improving the efficiency of processing form information.
[0126] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for processing form information, characterized in that: include: Receiving a plurality of page information sent by a client, the page information including a plurality of form information, a user identifier corresponding to the form information, and input information of the user identifier for each of the form information; For each of the form information, convert the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction, and store the input parameters in a bitmap format through the bitmap storage instruction; When a query request for form information is received, the input information corresponding to the form information and the user identification associated with the input information are queried using a bitmap query instruction.
2. The method according to claim 1, characterized in that The bitmap storage instruction includes a unique key, an offset, and a key value; The step of converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction includes: Converting the form information into input parameters corresponding to the unique key; Converting the user identifier into an input parameter corresponding to the offset; The input information of the form information is converted into an input parameter corresponding to the key value.
3. The method according to claim 2, characterized in that The converting the user identifier into an input parameter corresponding to the offset comprises: The operation sequence of multiple users corresponding to the multiple user identifiers on the form in the page is obtained, and the input parameter of the offset is determined for each of the user identifiers according to the operation sequence of the multiple users on the form.
4. The method according to claim 1, characterized in that: The step of using a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information includes: Converting the query condition included in the query request into the query parameter required by the bitmap query instruction; The bitmap query instruction uses the query parameters to query the input information corresponding to the form information and the user identifier associated with the input information.
5. The method according to claim 4, characterized in that The query corresponds to the input information of the form information and a user identifier associated with the input information, including: In the case where the query parameters include at least two unique keys, key values corresponding to the unique keys, and a logical operator between at least two of the unique keys, The form information is queried for input information satisfying a logical operator between at least two of the unique keys and one or more user identifiers associated with the input information.
6. The method according to claim 5, characterized in that Before querying the form information for input information satisfying the logical operator between at least two of the unique keys and one or more user identifiers associated with the input information, the method further comprises: Determining a logical operation order for the at least two logical operators; The step of querying the input information in the form information that satisfies the logical operator between at least two of the unique keys and one or more user identifiers associated with the input information includes: Determining the ranking of each of the logical operators in the logical operation order; For the first logical operator in the top ranking, perform the following operations: Determining two first unique keys directly associated with the first logical operator; Query the form information for input information satisfying two of the first unique keys and the first logical operator and one or more user identifiers associated with the input information; An intermediate query set is generated according to one or more user identifiers associated with the input information.
7. The method according to claim 6, characterized in that The querying of the form information for input information satisfying a logical operator between at least two of the unique keys and one or more user identifiers associated with the input information further includes: For a second logical operator other than the first logical operator in the logical operation sequence, perform the following operations: Determine an intermediate query set of a previous logical operator corresponding to the second logical operator and a second unique key directly associated with the second logical operator; Querying the form information for an intermediate query set that satisfies the previous logical operator and input information of the second unique key and one or more user identifiers associated with the input information; Determine whether the second logical operator is the last one in the logical operation order; if not, generate an intermediate query set based on the intermediate query set that satisfies the previous logical operator and one or more user identifiers associated with the input information of the second unique key.
8. The method according to claim 2, characterized in that: It also includes: storing the corresponding relationship between the user identifier and the offset; Using a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information includes: Using a bitmap query instruction to query the input information corresponding to the form information and a bitmap format value corresponding to the user identifier associated with the input information; According to the correspondence between the user identifier and the offset, each of the bitmap format values is converted into a user identifier in text format.
9. The method according to claim 1, characterized in that: The storing the input parameters in a bitmap format by the bitmap storage instruction comprises: Storing the input parameters in a buffer in a bitmap format by means of the bitmap storage instruction; The step of using a bitmap query instruction to query the input information corresponding to the form information and the user identifier associated with the input information includes: The bitmap query instruction is used to query the cache for input information corresponding to the form information and a user identifier associated with the input information.
10. A device for processing form information, characterized in that: include: receiving information module, storing information module and querying information module; wherein, The information receiving module is used to receive a variety of page information sent by the client, wherein the page information includes a variety of form information, a user identifier corresponding to the form information, and input information of the user identifier for each of the form information; The storage information module is used for converting the form information, the input information of the form information and the user identifier into input parameters of a bitmap storage instruction for each of the form information, and storing the input parameters in a bitmap format through the bitmap storage instruction; The query information module is used to query the input information corresponding to the form information and the user identification associated with the input information using a bitmap query instruction when a query request for any form information is received.
11. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 9.
12. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Information processing method and device
CN108733681A
Status data storage method and device and data sending method and device
CN109977117A
User query method and device
CN111552715A
Bitmap-based user data analysis method and device and computer equipment
CN114328632A
