WO2023272660A1 - Test question picture optimization method and apparatus, computer device and storage medium - Google Patents

Test question picture optimization method and apparatus, computer device and storage medium Download PDF

Info

Publication number
WO2023272660A1
WO2023272660A1 PCT/CN2021/103866 CN2021103866W WO2023272660A1 WO 2023272660 A1 WO2023272660 A1 WO 2023272660A1 CN 2021103866 W CN2021103866 W CN 2021103866W WO 2023272660 A1 WO2023272660 A1 WO 2023272660A1
Authority
WO
WIPO (PCT)
Prior art keywords
picture
test question
information
test
question
Prior art date
Application number
PCT/CN2021/103866
Other languages
French (fr)
Chinese (zh)
Inventor
何华强
Original Assignee
东莞市小精灵教育软件有限公司
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 东莞市小精灵教育软件有限公司 filed Critical 东莞市小精灵教育软件有限公司
Priority to PCT/CN2021/103866 priority Critical patent/WO2023272660A1/en
Publication of WO2023272660A1 publication Critical patent/WO2023272660A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/583Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content

Definitions

  • the present application relates to the technical field of image processing, in particular to a test question picture optimization method, device, computer equipment and storage medium.
  • test question pictures are mainly to make test question pictures and store them in the database or users take photos and upload them.
  • breadth of the input pictures for making test questions which will reduce the number and richness of the test questions, and the pictures taken by users have problems of randomness and clarity that are difficult to meet the requirements, which cannot well meet the use of picture questions. Scenes.
  • test question picture optimization method comprising:
  • said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
  • the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture
  • test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
  • test question picture optimization device comprising:
  • a construction module for constructing an initial test question image library including a plurality of initial test question pictures and first test question information and first picture parameters of each of the initial test question pictures;
  • the receiving module is configured to obtain the picture of the test questions to be stored included in the picture storage instruction when receiving the picture storage instruction, identify the picture of the test questions to be stored, and obtain the picture of the test questions to be stored
  • the second test question information and the second picture parameters
  • a retrieval module configured to search in the initial test question picture library based on the second test question information
  • a determining module configured to use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture if there is first test question information consistent with the second test question information;
  • a comparison module configured to compare the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter , deleting the candidate picture, and storing the test question picture to be stored in the initial test question picture library;
  • the storage module is configured to construct a second test question picture library if there is no first test question information consistent with the second test question information, and store the test question pictures to be stored into the second test question picture bank.
  • a computer device comprising a memory and a processor
  • the memory stores computer-readable instructions computer-readable instructions
  • the computer-readable instructions when executed by the processor, cause the processor to perform the following step:
  • said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
  • the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture
  • test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
  • a computer-readable medium storing computer-readable instructions computer-readable instructions, when the computer-readable instructions computer-readable instructions are executed by a processor, cause the processor to perform the following steps:
  • said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
  • the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture
  • test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
  • the above-mentioned test question picture optimization method, device, computer equipment, and storage medium construct an initial test question picture library, and the initial test question picture storehouse includes a plurality of initial test question pictures and first test question information and first picture parameters of each initial test question picture ;
  • obtain the test question picture to be stored in the picture storage instruction identify the test question picture to be stored, and obtain the second test question information of the test question picture to be stored and the second picture parameter; based on the second test question information, search in the initial test question picture library; if there is the first test question information consistent with the second test question information, then the first test question information consistent with the second test question information will be
  • the initial test question picture corresponding to the first test question information is used as a candidate picture;
  • the first picture parameter of the candidate picture is compared with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than When the first picture parameter is used, delete the candidate picture, and store the test question picture to be stored in the initial test question picture library; if there is no
  • Fig. 1 is the flow chart of test question picture optimization method in an embodiment
  • Fig. 2 is the flow chart of the method for obtaining pictures of test questions to be put into storage in one embodiment
  • Fig. 3 is the flowchart of the method for determining the second test question information and the second picture parameters in one embodiment
  • Fig. 4 is a flowchart of a method for determining the completeness of a second picture parameter in an embodiment
  • FIG. 5 is a flow chart of a method for comparing first picture parameters and second picture parameters in an embodiment
  • Fig. 6 is a structural block diagram of a test question picture optimization device in an embodiment
  • Figure 7 is a block diagram of a computer device in one embodiment.
  • test question picture optimization method As shown in FIG. 1 , in one embodiment, a test question picture optimization method is provided, and the test question picture optimization method can be applied to both a terminal and a server, and this embodiment is illustrated by using a server as an example.
  • the test question image optimization method specifically includes the following steps:
  • Step 102 building an initial test question picture library, which includes a plurality of initial test question pictures and first test question information and first picture parameters of each initial test question picture.
  • the initial test question picture refers to the qualified test question picture that is pre-entered into the server, and the initial test question picture library is composed of a plurality of initial test question pictures, so as to be subsequently used as a standard for measuring whether the test question picture taken or uploaded by the user satisfies optimization.
  • the first test question information refers to the content information of the initial test question picture, such as OCR content information
  • the first picture parameter refers to the parameters reflecting the quality of the initial test question picture, for example, the color information, resolution, completeness or angle of the test question picture.
  • Step 104 when receiving the image storage instruction, obtain the picture of the test question to be stored in the picture storage instruction, identify the picture of the test question to be stored, and obtain the second test item information and the second picture parameters of the test question picture to be stored in the storage .
  • the picture to be stored refers to the test question picture taken or uploaded by the user
  • the second test question information is the content information of the test question picture to be stored
  • the second picture parameter is the quality parameter of the test question picture to be stored.
  • the determination methods of the first test item information and the second test item information are consistent, for example, using the OCR recognition method for identification and acquisition, and the parameter types of the first picture parameters and the second picture parameters are consistent with the determination methods. It can be understood that in this embodiment, by obtaining the picture of the test question to be stored, based on the comparison between the picture of the test question to be stored and the picture of the initial test question, it is ensured that the picture of the test question with better quality and more abundant questions can be screened out later.
  • Step 106 based on the second test question information, search in the initial test question picture library.
  • the second test question information is used as the search condition to search in the initial test question picture library, and determine whether the content information of the test question picture to be stored in the library is repeated with the content of an initial test question picture in the initial test question picture storehouse according to the search results, In order to ensure the accuracy of subsequent optimization of the initial test question image library.
  • Step 108 If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture.
  • the candidate picture refers to the initial test question picture whose content is repeated with that of the test question picture to be stored in the database.
  • the first test item information that is consistent with the second test item information
  • the initial test question picture corresponding to the first test question information is used as a candidate picture, and then the quality comparison is performed based on the candidate picture, so as to realize automatic iteration and optimization of the test question picture.
  • Step 110 compare the first picture parameter and the second picture parameter of the candidate picture according to the preset comparison rules, and delete the candidate picture when the second picture parameter is better than the first picture parameter, and store the test questions
  • the pictures are stored in the initial test question picture library.
  • the preset comparison rule refers to a comparison rule for comparing the quality of the picture of the test question to be stored in the database with the picture of the initial test question. For example, it may be to directly compare the size of a parameter contained in the first picture parameter and the second picture parameter, or to separately calculate the parameters contained in the first picture parameter and the second picture parameter according to the calculation rule of weighted summation Compare the calculated results. As a preference in this embodiment, the latter comparison rule is selected to ensure the accuracy and comprehensiveness of the comparison.
  • the second image parameter is better than the first image parameter, it indicates that the quality of the test question picture to be stored is better, so the candidate picture is deleted, and the test question picture to be stored is stored in the initial test question picture library, and the original test question picture is realized.
  • the automatic iteration and optimization of the library improves the quality of the initial test question image library.
  • Step 112 if there is no first test item information consistent with the second test item information, construct a second test item image library, and store the test item images to be stored into the second test item image library.
  • the second test question picture library realizes the expansion of test question pictures and improves the richness of test question picture questions.
  • the above method for optimizing test question pictures is to construct an initial test question picture library, which contains a plurality of initial test question pictures and the first test question information and first picture parameters of each initial test question picture; when receiving the picture storage instruction, obtain The pictures of the test questions to be stored in the picture storage instruction are identified, and the second test question information and the second picture parameters of the test question pictures to be stored are obtained; based on the second test question information, in the initial test question picture library Retrieve; if there is the first test item information consistent with the second test item information, then the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture; the first picture parameter of the candidate picture and the second The picture parameters are compared according to the preset comparison rules.
  • the second picture parameter When the second picture parameter is better than the first picture parameter, delete the candidate picture, and store the test question pictures to be stored in the initial test question picture library; If the first test question information is consistent with the two test question information, the second test question picture library will be constructed, and the test question pictures to be stored will be stored in the second test question picture library. Iterates and stores, automatically optimizes the quality of picture questions, expands the number of questions in test picture pictures, and improves users' experience in answering test questions.
  • step 102-step 112 can be used to continue to optimize the second test question picture bank and build the third test question picture bank , so as to further optimize and iterate the pictures of the test questions, and further expand the number of questions for the picture questions.
  • the picture of the test question to be stored is obtained by controlling the shooting device to take pictures of the picture question according to the preset photographing method, and the preset photographing method includes:
  • Step 104A setting a shooting frame when starting the camera interface of the shooting device, and adjusting the picture title to be located in the shooting frame;
  • Step 104B when the question number information of the picture question is detected, set at least one sub-shooting frame in the shooting frame according to the question number information and the corresponding question number position, and adjust the interval between each sub-shooting frame and the interval between each question number Take consistent photos to get the pictures of the test questions to be stored.
  • the shooting frame is set when the camera interface of the shooting device is started, for example, in the interface for the user to take a picture of a picture question, a shooting mine with two horizontal and two vertical guide lines is set to guide the user to adjust the horizontal and vertical of the picture of the test question, thereby obtaining A relatively standard picture of the test questions to be stored.
  • the question number information of the picture question is detected, the user can automatically pre-frame the test question according to the question number information and the question number position when the user takes a photo of the picture question, that is, set a sub-shooting mine for each question number, and adjust the frame size of each sub-shooting frame.
  • the interval is consistent with the interval between each question number, so as to obtain standardized pictures of the test questions to be stored. Understandably, in this embodiment, by setting the shooting frame, the accuracy of the angles of the pictures of the test questions to be stored is ensured, making the pictures of the test questions to be stored more standardized.
  • the second test question information and/or the first test question information include test question key text information
  • the second picture parameters and/or the first picture parameters include picture file memory, resolution, color value and completeness; identify the picture of the test question to be stored, and obtain the second test question information and the parameters of the second picture of the picture of the test question to be stored, including:
  • Step 104C using the optical character recognition method to recognize the initial test question picture to obtain the first test question information, and using the optical character recognition method to identify the test question picture to be stored in the storage to obtain the second test question information;
  • Step 104D obtain the pixel information of the picture of the test question to be stored, and calculate the resolution and picture file memory based on the pixel information;
  • Step 104E obtain the color depth and bit depth of the picture of the test question to be stored, and determine the color value based on the color depth and bit depth;
  • Step 104F determine the completeness based on the key word information of the test question in the first test question information and the test question keyword information in the second test question information; or determine the completeness according to the second test question information.
  • an optical character recognition algorithm is used to identify the initial test question pictures and the test question pictures to be stored in the database, so as to obtain the first test question information and the second test question information.
  • Use the pixel acquisition tool in OPENCV to obtain the pixel information of the picture to be stored in the test question; according to the calculation formula of the picture file memory: picture file memory picture length (pixel) x picture width (pixel) x memory space occupied by one pixel, calculated Image file memory.
  • resolution image length (pixel) ⁇ image width (pixel)
  • Bit depth refers to the number of bits used to store each pixel
  • color depth refers to how many bits each pixel uses to store the color.
  • Completeness is a parameter used to reflect the completeness of the picture of the test question to be stored in the database. The completeness can be determined according to the key word information of the test question in the first test question information and the test question keyword information in the second test question information.
  • the first test question information The key text information of the test questions in the test question information and the test question keyword information in the second test question information are completely consistent, then it is judged that the completeness of the second picture parameter is 100%, the first test question information in the initial test question bank contains the second test question information, and it is judged that The completeness in the second picture parameter is less than 100%, specifically, the completeness can be set to 0.
  • the completeness is determined according to the second test item information, and the completeness in the second picture parameter may be judged according to the semantic information of the second test item information.
  • the quantitative calculation of the parameters of the second picture is realized, so that more accurate comparison and optimization can be performed based on the parameters of the second picture. It should be noted that the calculation method of the first picture parameter of the initial test question picture is consistent with the calculation method of the second picture parameter, so as to ensure the accuracy of the subsequent comparison.
  • the completeness is determined according to the second test question information, including:
  • Step 104F1 respectively analyzing the test question key text information, picture information and table information in the second test question information, detecting whether the numbers corresponding to the question numbers in the test question key text information are continuous, and obtaining the first detection result;
  • Step 104F2 detecting whether there is picture information or table information consistent with the semantics of the key text information of the test question in the second test question information, and obtaining the second test result;
  • Step 104F3 determine the completeness according to the first detection result and the second detection result.
  • the test question key text information, picture information and table information in the second test question information are respectively analyzed to detect whether the numbers corresponding to the question numbers in the test question key text information are continuous, and the first detection result is obtained.
  • the first test result is determined to be complete; when the number corresponding to the question number is not continuous, the first test result is determined to be incomplete.
  • the key text information of the test question has subtitle (1) but no subtitle (2) etc. Detect whether there is picture information or table information consistent with the semantics of the key text information of the test question in the second test question information, and when there is picture information or table information consistent with the semantics of the key text information of the test question, it is determined that the second detection result is complete.
  • the first picture parameter and the second picture parameter of the candidate picture are compared according to a preset comparison rule, including:
  • Step 110A obtain the preset weights corresponding to the picture file memory, resolution, color value and completeness
  • Step 110B for the first picture parameter, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight, to obtain the first target parameter;
  • Step 110C for the second picture parameters, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weights to obtain the second target parameters;
  • Step 110D when the second target parameter is greater than the first target parameter, it is determined that the second picture parameter is better than the first picture parameter.
  • preset weights corresponding to image file memory, resolution, color value, and completeness are obtained in advance, and then weighted summation calculations are performed based on each parameter value in the first image parameter and the second image parameter, thereby realizing
  • the quantitative calculation of the parameters of the first picture and the parameters of the second picture is carried out to obtain specific values, which ensures the accuracy and comprehensiveness of the comparison.
  • searching in the initial test question picture library includes: using the first test question information as the first index value of the initial test question picture, and using the second test question information as the test question picture to be stored in the library of the second index value; searching among multiple first index values to find out whether there is a first index value consistent with the second index value.
  • the first test question information is used as the first index value of the initial test question picture
  • the second test question information is used as the second index value of the test question picture to be stored in the library, and a plurality of first index values are searched to find out whether there is a
  • the second index value is consistent with the first index value, so it only needs to match the first index value and the second index value, which improves retrieval efficiency.
  • the method further includes: when the user answering instruction is detected, acquiring the target index value contained in the user answering instruction; value, search for the corresponding target test question picture in the initial test question picture library and the second question picture library; send the target test question picture to the user for answering.
  • the target test question picture is an iteratively optimized test question picture, it is always kept that the user uses the picture question with the best quality so far, which improves the user experience.
  • a device for optimizing test question images comprising:
  • a construction module 602 configured to construct an initial test question picture library, the initial test question picture library including a plurality of initial test question pictures and first test question information and first picture parameters of each of the initial test question pictures;
  • the receiving module 604 is configured to obtain the picture of the test question to be stored included in the picture storage instruction when receiving the picture storage instruction, identify the test question picture to be stored, and obtain the test question picture to be stored The second test question information and the second picture parameters;
  • a retrieval module 606, configured to search in the initial test question picture library based on the second test question information
  • a determining module 608, configured to use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture if there is first test question information consistent with the second test question information;
  • a comparison module 610 configured to compare the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and if the second picture parameter is better than the first picture parameter , delete the candidate picture, and store the test question picture to be stored in the initial test question picture library;
  • the storage module 612 is configured to construct a second test question image library if there is no first test item information consistent with the second test item information, and store the test question pictures to be stored into the second test item image library.
  • the receiving module includes:
  • a first adjustment unit configured to set a shooting frame when starting the camera interface of the shooting device, and adjust the picture title to be located in the shooting frame;
  • the second adjustment unit is configured to set at least one sub-frame in the frame according to the frame information and the corresponding position of the frame when detecting the frame number information of the picture frame, and adjust each of the frame frames.
  • the intervals between the shooting frames are consistent with the intervals between the various question numbers to obtain the pictures of the test questions to be stored.
  • the receiving module also includes:
  • the recognition unit is configured to use an optical character recognition method to recognize the picture of the initial test question to obtain the information of the first test question, and use an optical character recognition method to recognize the picture of the test question to be stored in the database to obtain the second test question information;
  • a calculation unit configured to obtain pixel information of the picture of the test question to be stored, and calculate the resolution and the memory of the picture file based on the pixel information;
  • a first determining unit configured to acquire the color depth and bit depth of the picture of the test question to be stored, and determine the color value based on the color depth and bit depth;
  • the second determining unit is configured to determine the completeness based on the test question key word information in the first test question information and the test question keyword information in the second test question information; or, determine the completeness according to the second test question information completeness of description.
  • the second determination unit includes:
  • the analysis subunit is used to analyze the test question key text information, picture information and table information in the second test question information, and detect whether the numbers corresponding to the question numbers in the test question key text information are continuous, and obtain the first detection result;
  • the detection subunit is used to detect whether there is picture information or table information consistent with the semantics of the key text information of the test item in the second test item information, and obtain a second test result;
  • a determining subunit configured to determine the completeness according to the first detection result and the second detection result.
  • the comparison module includes:
  • An acquisition unit configured to acquire preset weights corresponding to memory, resolution, color value and integrity of the image file
  • the first calculation unit is configured to perform weighted calculations for the first picture parameters based on the picture file memory, resolution, color value and integrity and corresponding preset weights to obtain the first target parameters;
  • the first calculation unit is configured to perform weighted calculations for the second picture parameters based on the picture file memory, resolution, color value and completeness and corresponding preset weights to obtain second target parameters;
  • a third determining unit configured to determine that the second picture parameter is better than the first picture parameter when the second target parameter is greater than the first target parameter.
  • the retrieval module includes:
  • An identification unit configured to use the first test question information as the first index value of the initial test question picture, and use the second test question information as the second index value of the test question picture to be stored;
  • a searching unit configured to search among a plurality of first index values, and find whether there is the first index value consistent with the second index value.
  • test question picture optimization device also includes:
  • a detection module configured to obtain the target index value contained in the user answering instruction when the user answering instruction is detected
  • a search module configured to search for a corresponding target test question picture in the initial test question picture library and the second question picture library according to the target index value
  • a sending module configured to send the target test question picture to the user for answering the question.
  • Figure 7 shows a diagram of the internal structure of a computer device in one embodiment.
  • the computer device may be a server, and the server includes but is not limited to a high-performance computer and a cluster of high-performance computers.
  • the computer device includes a processor, a memory, and a network interface connected through a system bus.
  • the memory includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium of the computer device stores an operating system, and may also store computer-readable instructions.
  • the computer-readable instructions can cause the processor to implement Optimization.
  • the internal memory may also store computer-readable instructions.
  • the processor may execute the test question picture optimization method.
  • FIG. 7 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation to the computer equipment on which the solution of this application is applied.
  • the specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • the test question picture optimization method provided by the present application can be realized in the form of a computer readable instruction computer readable instruction, and the computer readable instruction computer readable instruction can be run on a computer device as shown in FIG. 7 .
  • Various program templates constituting the test question picture optimization device can be stored in the memory of the computer equipment. For example, a construction module 602 , a receiving module 604 , a retrieval module 606 , a determination module 608 , a comparison module 610 , and a storage module 612 .
  • a computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable instructions
  • the following steps are implemented during the instruction: constructing an initial test question picture library, said initial test question picture storehouse comprising a plurality of initial test question pictures and the first test question information and first picture parameters of each said initial test question picture; when receiving the picture storage instruction , obtain the picture of the test question to be stored in the instruction for storing the picture, identify the picture of the test question to be stored in the store, and obtain the second test question information and the second picture parameters of the picture of the test question to be stored in the store; based on the The second test question information is searched in the initial test question picture library; if there is the first test question information consistent with the second test question information, the initial test question corresponding to the first test question information consistent with the second test question information A picture is used as a candidate picture; comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and when the second
  • the picture of the test questions to be stored is obtained by controlling the shooting device to take pictures of the picture questions according to a preset way of taking pictures, and the preset way of taking pictures includes: Set the shooting frame, adjust the picture title to be located in the shooting frame; when the question number information of the picture question is detected, set at least one in the shooting frame according to the question number information and the corresponding question number position Sub-shooting frames, adjust the intervals of each sub-shooting frame to be consistent with the intervals between each question number, and shoot to obtain the pictures of the test questions to be stored.
  • the second test question information and/or the first test question information includes test question key text information
  • the second picture parameters and/or first picture parameters include picture file memory, resolution, color value and completeness. degree
  • the identifying the picture of the test question to be stored in the database, and obtaining the second test question information and the second picture parameters of the picture of the test question to be stored in the database includes: using an optical character recognition method to identify the initial test question picture, Obtaining the first test item information, and using an optical character recognition method to identify the picture of the test question to be stored, and obtaining the second test item information; acquiring the pixel information of the picture of the test question to be stored, based on the pixel information Calculate the resolution and the image file memory; obtain the color depth and bit depth of the test question picture to be stored, and determine the color value based on the color depth and bit depth; based on the first test question information
  • the completeness is determined according to the key text information of the test question and the key word information of the test question in the second test question information; or, the completeness
  • the determining the completeness according to the second test item information includes: respectively analyzing the test item key text information, picture information and form information in the second test item information, and detecting the test item Whether the number corresponding to the question number in the key text information is continuous, obtains the first test result; detects whether there is picture information or form information consistent with the semantics of the key text information of the test question in the second test question information, and obtains the second test result Result; determining the completeness according to the first detection result and the second detection result.
  • the comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule includes: acquiring the memory, resolution, and color value of the picture file and the preset weight corresponding to the completeness; for the first picture parameter, weighted calculation is performed based on the picture file memory, resolution, color value and completeness and the corresponding preset weight to obtain the first target parameter; for the first picture parameter The second picture parameter is weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the second target parameter; when the second target parameter is greater than the first target parameters, it is determined that the second picture parameter is better than the first picture parameter.
  • the searching in the initial test question picture library based on the second test question information includes: using the first test question information as the first index value of the initial test question picture, and setting The second test question information is used as the second index value of the test question picture to be stored in the library; searching among multiple first index values to find out whether there is the first index value consistent with the second index value.
  • the method further includes: when a user answering instruction is detected, acquiring the user answering instruction The target index value contained in; according to the target index value, search for the corresponding target test picture in the initial test picture library and the second question picture library; send the target test picture to the user for answering .
  • a computer-readable storage medium stores computer-readable instructions computer-readable instructions, characterized in that, when the computer-readable instructions are executed by a processor, the following steps are implemented: constructing An initial test question picture library, the initial test question picture bank includes a plurality of initial test question pictures and the first test question information and first picture parameters of each of the initial test question pictures; The picture of the test question to be stored in the library instruction is identified, and the second test question information and the second picture parameters of the picture of the test question to be stored in the picture are obtained; based on the second test question information, in retrieve in the initial test question picture library; if there is the first test question information consistent with the second test question information, then use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture; The first picture parameter of the candidate picture is compared with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter, the candidate picture is deleted, and Put the pictures of the test questions to be stored into
  • the picture of the test questions to be stored is obtained by controlling the shooting device to take pictures of the picture questions according to a preset way of taking pictures, and the preset way of taking pictures includes: Set the shooting frame, adjust the picture title to be located in the shooting frame; when the question number information of the picture question is detected, set at least one in the shooting frame according to the question number information and the corresponding question number position Sub-shooting frames, adjust the intervals of each sub-shooting frame to be consistent with the intervals between each question number, and shoot to obtain the pictures of the test questions to be stored.
  • the second test question information and/or the first test question information includes test question key text information
  • the second picture parameters and/or first picture parameters include picture file memory, resolution, color value and completeness. degree
  • the identifying the picture of the test question to be stored in the database, and obtaining the second test question information and the second picture parameters of the picture of the test question to be stored in the database includes: using an optical character recognition method to identify the initial test question picture, Obtaining the first test item information, and using an optical character recognition method to identify the picture of the test question to be stored, and obtaining the second test item information; acquiring the pixel information of the picture of the test question to be stored, based on the pixel information Calculate the resolution and the image file memory; obtain the color depth and bit depth of the test question picture to be stored, and determine the color value based on the color depth and bit depth; based on the first test question information
  • the completeness is determined according to the key text information of the test question and the key word information of the test question in the second test question information; or, the completeness
  • the determining the completeness according to the second test item information includes: respectively analyzing the test item key text information, picture information and form information in the second test item information, and detecting the test item Whether the number corresponding to the question number in the key text information is continuous, obtains the first test result; detects whether there is picture information or form information consistent with the semantics of the key text information of the test question in the second test question information, and obtains the second test result Result; determining the completeness according to the first detection result and the second detection result.
  • the comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule includes: acquiring the memory, resolution, and color value of the picture file and the preset weight corresponding to the completeness; for the first picture parameter, weighted calculation is performed based on the picture file memory, resolution, color value and completeness and the corresponding preset weight to obtain the first target parameter; for the first picture parameter The second picture parameter is weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the second target parameter; when the second target parameter is greater than the first target parameters, it is determined that the second picture parameter is better than the first picture parameter.
  • the searching in the initial test question picture library based on the second test question information includes: using the first test question information as the first index value of the initial test question picture, and setting The second test question information is used as the second index value of the test question picture to be stored in the library; searching among multiple first index values to find out whether there is the first index value consistent with the second index value.
  • the method further includes: when a user answering instruction is detected, acquiring the user answering instruction The target index value contained in; according to the target index value, search for the corresponding target test picture in the initial test picture library and the second question picture library; send the target test picture to the user for answering .
  • Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory can include random access memory (RAM) or external cache memory.
  • RAM random access memory
  • RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Abstract

Disclosed in embodiments of the present application is a test question picture optimization method, comprising: constructing an initial test question picture library; when a picture storage instruction is received, acquiring test question pictures to be stored contained in the picture storage instruction, and recognizing said test question pictures to obtain second test question information and second picture parameters of said test question pictures; retrieving the initial test question picture library on the basis of the second test question information; if first test question information consistent with the second test question information exists, when the second picture parameters are superior to first picture parameters, storing said test question pictures into the initial test question picture library; and if the first test question information consistent with the second test question information does not exist, constructing a second test question picture library, and storing said test question pictures into the second test question picture library, such that automatic iteration and storage of test question pictures are realized by combining with comparison of the initial test question picture library, the question quality of the pictures is automatically optimized, the question quantity of the test question pictures is expanded, and the user experience in test question answering is improved.

Description

试题图片优化方法、装置、计算机设备及存储介质Test question picture optimization method, device, computer equipment and storage medium 技术领域technical field
本申请涉及图像处理技术领域,尤其涉及一种试题图片优化方法、装置、计算机设备及存储介质。The present application relates to the technical field of image processing, in particular to a test question picture optimization method, device, computer equipment and storage medium.
背景技术Background technique
随着网络以及科学技术的发展,人们的学习方式越来越多样化,也越来越便捷,如利用家教机学习,在进行学习过程中,会涉及到模拟考试,这就要求家教机提供试题图片。With the development of the Internet and science and technology, people's learning methods are becoming more and more diverse and convenient. For example, using tutoring machines to learn, mock exams will be involved in the learning process, which requires tutoring machines to provide test questions picture.
技术问题technical problem
然而,目前的试题图片的来源主要是制作试题图片入库或者用户拍照上传。对于录入的制作试题图片存在一定的广度局限性,会降低试题的题量和丰富性,而用户拍的图片又存在随意性及清晰度难以达到要求的问题,不能很好的满足图片题的使用场景。However, the current source of test question pictures is mainly to make test question pictures and store them in the database or users take photos and upload them. There is a certain limitation in the breadth of the input pictures for making test questions, which will reduce the number and richness of the test questions, and the pictures taken by users have problems of randomness and clarity that are difficult to meet the requirements, which cannot well meet the use of picture questions. Scenes.
技术解决方案technical solution
基于此,有必要针对上述问题,提出一种能够自动优化试题图片质量且扩充题量的试题图片优化方法、装置、计算机设备及存储介质。Based on this, it is necessary to address the above problems and propose a test question picture optimization method, device, computer equipment and storage medium that can automatically optimize the test question picture quality and expand the number of questions.
一种试题图片优化方法,所述方法包括:A test question picture optimization method, the method comprising:
构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;Constructing an initial test question picture library, said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;When receiving the image storage instruction, obtain the test question picture to be stored in the picture storage instruction, identify the test question picture to be stored, and obtain the second test item information and the test question picture to be stored in the storage. Second picture parameter;
基于所述第二试题信息,在所述初始试题图片库中进行检索;Searching in the initial test question image library based on the second test question information;
若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture;
将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and deleting the candidate picture when the second picture parameter is better than the first picture parameter , and store the picture of the test question to be stored into the library of the initial test question picture;
若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。If there is no first test item information consistent with the second test item information, a second test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
一种试题图片优化装置,所述装置包括:A test question picture optimization device, said device comprising:
构建模块,用于构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;A construction module for constructing an initial test question image library, the initial test question image library including a plurality of initial test question pictures and first test question information and first picture parameters of each of the initial test question pictures;
接收模块,用于当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;The receiving module is configured to obtain the picture of the test questions to be stored included in the picture storage instruction when receiving the picture storage instruction, identify the picture of the test questions to be stored, and obtain the picture of the test questions to be stored The second test question information and the second picture parameters;
检索模块,用于基于所述第二试题信息,在所述初始试题图片库中进行检索;A retrieval module, configured to search in the initial test question picture library based on the second test question information;
确定模块,用于若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;A determining module, configured to use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture if there is first test question information consistent with the second test question information;
比对模块,用于将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;A comparison module, configured to compare the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter , deleting the candidate picture, and storing the test question picture to be stored in the initial test question picture library;
入库模块,用于若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。The storage module is configured to construct a second test question picture library if there is no first test question information consistent with the second test question information, and store the test question pictures to be stored into the second test question picture bank.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机可读指令计算机可读指令,所述计算机可读指令计算机可读指令被所述处理器执行时,使得所述处理器执行以下步骤:A computer device, comprising a memory and a processor, the memory stores computer-readable instructions computer-readable instructions, the computer-readable instructions, when executed by the processor, cause the processor to perform the following step:
构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;Constructing an initial test question picture library, said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;When receiving the image storage instruction, obtain the test question picture to be stored in the picture storage instruction, identify the test question picture to be stored, and obtain the second test item information and the test question picture to be stored in the storage. Second picture parameter;
基于所述第二试题信息,在所述初始试题图片库中进行检索;Searching in the initial test question image library based on the second test question information;
若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture;
将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and deleting the candidate picture when the second picture parameter is better than the first picture parameter , and store the picture of the test question to be stored into the library of the initial test question picture;
若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。If there is no first test item information consistent with the second test item information, a second test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
一种计算机可读介质,存储有计算机可读指令计算机可读指令,所述计算机可读指令计算机可读指令被处理器执行时,使得所述处理器执行以下步骤:A computer-readable medium, storing computer-readable instructions computer-readable instructions, when the computer-readable instructions computer-readable instructions are executed by a processor, cause the processor to perform the following steps:
构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;Constructing an initial test question picture library, said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;When receiving the image storage instruction, obtain the test question picture to be stored in the picture storage instruction, identify the test question picture to be stored, and obtain the second test item information and the test question picture to be stored in the storage. Second picture parameter;
基于所述第二试题信息,在所述初始试题图片库中进行检索;Searching in the initial test question image library based on the second test question information;
若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture;
将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and deleting the candidate picture when the second picture parameter is better than the first picture parameter , and store the picture of the test question to be stored into the library of the initial test question picture;
若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。If there is no first test item information consistent with the second test item information, a second test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
有益效果Beneficial effect
上述试题图片优化方法、装置、计算机设备及存储介质,构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;基于所述第二试题信息,在所述初始试题图片库中进行检索;若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库,通过对试题图片的分析和比较,实现了对试题图片的自我迭代和优化,提升试题图片质量的同时还扩充了试题图片的题量,提升用户体验。The above-mentioned test question picture optimization method, device, computer equipment, and storage medium construct an initial test question picture library, and the initial test question picture storehouse includes a plurality of initial test question pictures and first test question information and first picture parameters of each initial test question picture ; When receiving the picture storage instruction, obtain the test question picture to be stored in the picture storage instruction, identify the test question picture to be stored, and obtain the second test question information of the test question picture to be stored and the second picture parameter; based on the second test question information, search in the initial test question picture library; if there is the first test question information consistent with the second test question information, then the first test question information consistent with the second test question information will be The initial test question picture corresponding to the first test question information is used as a candidate picture; the first picture parameter of the candidate picture is compared with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than When the first picture parameter is used, delete the candidate picture, and store the test question picture to be stored in the initial test question picture library; if there is no first test question information consistent with the second test question information, construct The second test question picture library, and store the test question pictures to be stored in the second test question picture bank, through the analysis and comparison of the test question pictures, realize the self-iteration and optimization of the test question pictures, and improve the quality of the test question pictures At the same time, it also expands the number of test questions and pictures to improve user experience.
附图说明Description of drawings
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain other drawings based on these drawings without creative work.
其中:in:
图1为一个实施例中试题图片优化方法的流程图;Fig. 1 is the flow chart of test question picture optimization method in an embodiment;
图2为一个实施例中待入库试题图片获取方法的流程图;Fig. 2 is the flow chart of the method for obtaining pictures of test questions to be put into storage in one embodiment;
图3为一个实施例中第二试题信息和第二图片参数确定方法的流程图;Fig. 3 is the flowchart of the method for determining the second test question information and the second picture parameters in one embodiment;
图4为一个实施例中第二图片参数的完整度的确定方法的流程图;Fig. 4 is a flowchart of a method for determining the completeness of a second picture parameter in an embodiment;
图5为一个实施例中第一图片参数与第二图片参数比对方法的流程图;FIG. 5 is a flow chart of a method for comparing first picture parameters and second picture parameters in an embodiment;
图6为一个实施例中试题图片优化装置的结构框图;Fig. 6 is a structural block diagram of a test question picture optimization device in an embodiment;
图7为一个实施例中计算机设备的结构框图。Figure 7 is a block diagram of a computer device in one embodiment.
本发明的实施方式Embodiments of the present invention
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the application with reference to the drawings in the embodiments of the application. Apparently, the described embodiments are only some of the embodiments of the application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
如图1所示,在一个实施例中,提供了一种试题图片优化方法,该试题图片优化方法既可以应用于终端,也可以应用于服务器,本实施例以应用于服务器举例说明。该试题图片优化方法具体包括以下步骤:As shown in FIG. 1 , in one embodiment, a test question picture optimization method is provided, and the test question picture optimization method can be applied to both a terminal and a server, and this embodiment is illustrated by using a server as an example. The test question image optimization method specifically includes the following steps:
步骤102,构建初始试题图片库,初始试题图片库包含多张初始试题图片及每张初始试题图片的第一试题信息及第一图片参数。Step 102, building an initial test question picture library, which includes a plurality of initial test question pictures and first test question information and first picture parameters of each initial test question picture.
其中,初始试题图片是指预先录入到服务器的质量合格的试题图片,给多张初始试题图片构成了初始试题图片库,以便后续作为对用户拍摄或者上传的试题图片是否满足优化的衡量的标准。第一试题信息是指初始试题图片的内容信息,如OCR内容信息,第一图片参数是指反映初始试题图片质量的参数,例如,试题图片的颜色信息、分辨率、完整度或者角度等。Among them, the initial test question picture refers to the qualified test question picture that is pre-entered into the server, and the initial test question picture library is composed of a plurality of initial test question pictures, so as to be subsequently used as a standard for measuring whether the test question picture taken or uploaded by the user satisfies optimization. The first test question information refers to the content information of the initial test question picture, such as OCR content information, and the first picture parameter refers to the parameters reflecting the quality of the initial test question picture, for example, the color information, resolution, completeness or angle of the test question picture.
步骤104,当接收到图片入库指令时,获取图片入库指令中包含的待入库试题图片,对待入库试题图片进行识别,得到待入库试题图片的第二试题信息和第二图片参数。Step 104, when receiving the image storage instruction, obtain the picture of the test question to be stored in the picture storage instruction, identify the picture of the test question to be stored, and obtain the second test item information and the second picture parameters of the test question picture to be stored in the storage .
其中,待入库图片是指用户拍摄或者上传的试题图片,第二试题信息即为待入库试题图片的内容信息,第二图片参数即为待入库试题图片的质量的参数。且第一试题信息和第二试题信息的确定方法一致,如利用OCR识别方法进行识别获取,且第一图片参数和第二图片参数的参数类型和确定方法一致。可以理解的,本实施例中,通过获取待入库试题图片,基于待入库试题图片和初始试题图片的比较,进而保证后续能够筛选出质量更优,题量更加丰富的试题图片。Wherein, the picture to be stored refers to the test question picture taken or uploaded by the user, the second test question information is the content information of the test question picture to be stored, and the second picture parameter is the quality parameter of the test question picture to be stored. And the determination methods of the first test item information and the second test item information are consistent, for example, using the OCR recognition method for identification and acquisition, and the parameter types of the first picture parameters and the second picture parameters are consistent with the determination methods. It can be understood that in this embodiment, by obtaining the picture of the test question to be stored, based on the comparison between the picture of the test question to be stored and the picture of the initial test question, it is ensured that the picture of the test question with better quality and more abundant questions can be screened out later.
步骤106,基于第二试题信息,在初始试题图片库中进行检索。Step 106, based on the second test question information, search in the initial test question picture library.
具体地,以第二试题信息作为检索条件,在初始试题图片库中进行检索,根据检索结果确定待入库试题图片的内容信息是否与初始试题图片库中的一张初始试题图片的内容重复,以保证后续对初始试题图片库优化的准确性。Specifically, the second test question information is used as the search condition to search in the initial test question picture library, and determine whether the content information of the test question picture to be stored in the library is repeated with the content of an initial test question picture in the initial test question picture storehouse according to the search results, In order to ensure the accuracy of subsequent optimization of the initial test question image library.
步骤108,若存在与第二试题信息一致的第一试题信息,则将与第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片。Step 108: If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture.
其中,候选图片是指与待入库试题图片内容重复的初始试题图片。具体地,当存在与第二试题信息一致的第一试题信息,表明待入库试题图片的内容与初始试题图片库中的一张初始试题图片的内容重复,因此,将与第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片,进而后续基于该候选图片进行质量比对,以实现对对试题图片的自动迭代和优化。Wherein, the candidate picture refers to the initial test question picture whose content is repeated with that of the test question picture to be stored in the database. Specifically, when there is the first test item information that is consistent with the second test item information, it indicates that the content of the test item picture to be stored in the library is the same as the content of an initial test question picture in the initial test question image library, so it will be consistent with the second test item information The initial test question picture corresponding to the first test question information is used as a candidate picture, and then the quality comparison is performed based on the candidate picture, so as to realize automatic iteration and optimization of the test question picture.
步骤110,将候选图片的第一图片参数与第二图片参数按照预设的比对规则进行比对,在第二图片参数优于第一图片参数时,删除候选图片,并将待入库试题图片入库至初始试题图片库。Step 110, compare the first picture parameter and the second picture parameter of the candidate picture according to the preset comparison rules, and delete the candidate picture when the second picture parameter is better than the first picture parameter, and store the test questions The pictures are stored in the initial test question picture library.
其中,预设的比对规则是指用于比较待入库试题图片入库与初始试题图片的质量的比对规则。例如,可以是直接比较第一图片参数与第二图片参数中包含的一个参数的大小,也可以是分别计算第一图片参数与第二图片参数中中包含的各个参数按照加权求和的计算规则进行计算后的结果进行比较。作为本实施例中的优选,选取后面一种比对规则,以保证对比的准确性和全面性。Wherein, the preset comparison rule refers to a comparison rule for comparing the quality of the picture of the test question to be stored in the database with the picture of the initial test question. For example, it may be to directly compare the size of a parameter contained in the first picture parameter and the second picture parameter, or to separately calculate the parameters contained in the first picture parameter and the second picture parameter according to the calculation rule of weighted summation Compare the calculated results. As a preference in this embodiment, the latter comparison rule is selected to ensure the accuracy and comprehensiveness of the comparison.
当第二图片参数优于第一图片参数时,则表明待入库试题图片的质量更优,从而删除候选图片,将待入库试题图片入库至初始试题图片库,实现了对初始试题图片库的自动迭代和优化,提高了初始试题图片库的质量。When the second image parameter is better than the first image parameter, it indicates that the quality of the test question picture to be stored is better, so the candidate picture is deleted, and the test question picture to be stored is stored in the initial test question picture library, and the original test question picture is realized. The automatic iteration and optimization of the library improves the quality of the initial test question image library.
步骤112,若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将待入库试题图片入库至第二试题图片库。Step 112, if there is no first test item information consistent with the second test item information, construct a second test item image library, and store the test item images to be stored into the second test item image library.
具体地,当不存在与第二试题信息一致的第一试题信息,表明待入库试题图片中的试题为新题,因此,构建第二试题图片库,并将待入库试题图片入库至第二试题图片库,实现了对试题图片的题量扩充,提升了试题图片题量的丰富性。Specifically, when there is no first test question information consistent with the second test question information, it indicates that the test question in the picture of the test question to be stored is a new question. The second test question picture library realizes the expansion of test question pictures and improves the richness of test question picture questions.
上述试题图片优化方法,通过构建初始试题图片库,初始试题图片库包含多张初始试题图片及每张初始试题图片的第一试题信息及第一图片参数;当接收到图片入库指令时,获取图片入库指令中包含的待入库试题图片,对待入库试题图片进行识别,得到待入库试题图片的第二试题信息和第二图片参数;基于第二试题信息,在初始试题图片库中进行检索;若存在与第二试题信息一致的第一试题信息,则将与第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;将候选图片的第一图片参数与第二图片参数按照预设的比对规则进行比对,在第二图片参数优于第一图片参数时,删除候选图片,并将待入库试题图片入库至初始试题图片库;若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将待入库试题图片入库至第二试题图片库,通过结合初始试题图片库的比对,实现对试题图片的自动迭代和入库,自动优化图片题质量,扩充了试题图片的题量,提升用户进行试题答题的体验。The above method for optimizing test question pictures is to construct an initial test question picture library, which contains a plurality of initial test question pictures and the first test question information and first picture parameters of each initial test question picture; when receiving the picture storage instruction, obtain The pictures of the test questions to be stored in the picture storage instruction are identified, and the second test question information and the second picture parameters of the test question pictures to be stored are obtained; based on the second test question information, in the initial test question picture library Retrieve; if there is the first test item information consistent with the second test item information, then the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture; the first picture parameter of the candidate picture and the second The picture parameters are compared according to the preset comparison rules. When the second picture parameter is better than the first picture parameter, delete the candidate picture, and store the test question pictures to be stored in the initial test question picture library; If the first test question information is consistent with the two test question information, the second test question picture library will be constructed, and the test question pictures to be stored will be stored in the second test question picture library. Iterates and stores, automatically optimizes the quality of picture questions, expands the number of questions in test picture pictures, and improves users' experience in answering test questions.
值得说明的是,对于第二试题图片库,当后续接收到待入库试题图片时,可以采用如步骤102-步骤112的方法继续对第二试题图片库进行优化,并构建第三试题图片库,从而进一步对试题图片进行优化和迭代,并进一步扩充图片题的题量。It is worth noting that, for the second test question picture library, when the test question picture to be stored is subsequently received, the method such as step 102-step 112 can be used to continue to optimize the second test question picture bank and build the third test question picture bank , so as to further optimize and iterate the pictures of the test questions, and further expand the number of questions for the picture questions.
如图2所示,在一个实施例中,待入库试题图片是通过控制拍摄设备按照预设的拍照方式对图片题进行拍照得到,预设的拍照方式包括:As shown in Figure 2, in one embodiment, the picture of the test question to be stored is obtained by controlling the shooting device to take pictures of the picture question according to the preset photographing method, and the preset photographing method includes:
步骤104A,在启动拍摄设备的拍照界面时设置拍摄框,调整图片题位于拍摄框内;Step 104A, setting a shooting frame when starting the camera interface of the shooting device, and adjusting the picture title to be located in the shooting frame;
步骤104B,当检测到图片题的题号信息时,根据题号信息及对应的题号位置在拍摄框中设置至少一个子拍摄框,调整各个子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,得到待入库试题图片。Step 104B, when the question number information of the picture question is detected, set at least one sub-shooting frame in the shooting frame according to the question number information and the corresponding question number position, and adjust the interval between each sub-shooting frame and the interval between each question number Take consistent photos to get the pictures of the test questions to be stored.
在这个实施例中,在启动拍摄设备的拍照界面时设置拍摄框,例如,用户拍照图片题的界面,设置两横两竖引导线的拍摄矿,引导用户调整试题图片的横平竖直,从而得到比较规范的待入库试题图片。进一步的,当检测到图片题的题号信息时,用户拍照图片题时可以根据题号信息和题号位置自动预框试题,即每个题号设置一个子拍摄矿,调整各个子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,从而得到规范的待入库试题图片。可以理解地,本实施例中,通过设置拍摄框,保证了待入库试题图片角度的精准性,使得待入库试题图片更加规范。In this embodiment, the shooting frame is set when the camera interface of the shooting device is started, for example, in the interface for the user to take a picture of a picture question, a shooting mine with two horizontal and two vertical guide lines is set to guide the user to adjust the horizontal and vertical of the picture of the test question, thereby obtaining A relatively standard picture of the test questions to be stored. Further, when the question number information of the picture question is detected, the user can automatically pre-frame the test question according to the question number information and the question number position when the user takes a photo of the picture question, that is, set a sub-shooting mine for each question number, and adjust the frame size of each sub-shooting frame. The interval is consistent with the interval between each question number, so as to obtain standardized pictures of the test questions to be stored. Understandably, in this embodiment, by setting the shooting frame, the accuracy of the angles of the pictures of the test questions to be stored is ensured, making the pictures of the test questions to be stored more standardized.
如图3所示,在一个实施例中,第二试题信息和/或第一试题信息包括试题关键文字信息,第二图片参数和/或第一图片参数包括图片文件内存、分辨率、颜色值及完整度;对待入库试题图片进行识别,得到待入库试题图片的第二试题信息和第二图片参数,包括:As shown in Figure 3, in one embodiment, the second test question information and/or the first test question information include test question key text information, and the second picture parameters and/or the first picture parameters include picture file memory, resolution, color value and completeness; identify the picture of the test question to be stored, and obtain the second test question information and the parameters of the second picture of the picture of the test question to be stored, including:
步骤104C,采用光学字符识别方法对初始试题图片进行识别,得到第一试题信息,并采用光学字符识别方法对待入库试题图片进行识别,得到第二试题信息;Step 104C, using the optical character recognition method to recognize the initial test question picture to obtain the first test question information, and using the optical character recognition method to identify the test question picture to be stored in the storage to obtain the second test question information;
步骤104D,获取待入库试题图片的像素信息,基于像素信息计算得到分辨率和图片文件内存;Step 104D, obtain the pixel information of the picture of the test question to be stored, and calculate the resolution and picture file memory based on the pixel information;
步骤104E,获取待入库试题图片的色深和位深,基于色深和位深确定颜色值;Step 104E, obtain the color depth and bit depth of the picture of the test question to be stored, and determine the color value based on the color depth and bit depth;
步骤104F,基于第一试题信息中的试题关键文字信息及第二试题信息中的试题关键字信息确定完整度;或者,根据第二试题信息确定完整度。Step 104F, determine the completeness based on the key word information of the test question in the first test question information and the test question keyword information in the second test question information; or determine the completeness according to the second test question information.
在这个实施例中,首先采用光学字符识别算法对初始试题图片及待入库试题图片进行识别,得到第一试题信息和第二试题信息。通过OPENCV中的像素获取工具获取待入库试题图片的像素信息;根据图片文件内存的计算公式:图片文件内存=图片长度(像素)×图片宽度(像素)×一个像素所占内存空间,计算得到图片文件内存。根据分辨率的计算公式:分辨率=图片长度(像素)×图片宽度(像素),计算得到分辨率。位深度指的是存储每个像素所用的位数,色深指的是每一个像素点用多少bit存储颜色。获取待入库试题图片的色深和位深,根据色深和位深确定颜色值,例如,可以计算色深和位深的和或者乘积,作为颜色值。完整度是用于反映待入库试题图片完整程度的参数,可以根据第一试题信息中的试题关键文字信息及第二试题信息中的试题关键字信息确定完整度,例如,当第一试题信息中的试题关键文字信息及第二试题信息中的试题关键字信息完全一致,则判定第二图片参数中的完整度为100%,初始试题库中的第一试题信息包含第二试题信息,判定第二图片参数中的完整度小于100%,具体地,可以将该完整度设置为0。或者,根据第二试题信息确定完整度,可以根据第二试题信息的语义信息判断第二图片参数中的完整度。可以理解地,本实施例中,通过对待入库试题图片进行分析,实现了对第二图片参数的量化计算,以便后续基于第二图片参数进行更加准确的的比对和优化。需要说明的是,初始试题图片的第一图片参数的计算方法与第二图片参数计算方法一致,以保证后续比对的准确性。In this embodiment, firstly, an optical character recognition algorithm is used to identify the initial test question pictures and the test question pictures to be stored in the database, so as to obtain the first test question information and the second test question information. Use the pixel acquisition tool in OPENCV to obtain the pixel information of the picture to be stored in the test question; according to the calculation formula of the picture file memory: picture file memory = picture length (pixel) x picture width (pixel) x memory space occupied by one pixel, calculated Image file memory. According to the calculation formula of resolution: resolution = image length (pixel) × image width (pixel), calculate the resolution. Bit depth refers to the number of bits used to store each pixel, and color depth refers to how many bits each pixel uses to store the color. Obtain the color depth and bit depth of the picture of the test question to be stored, and determine the color value according to the color depth and bit depth. For example, the sum or product of the color depth and bit depth can be calculated as the color value. Completeness is a parameter used to reflect the completeness of the picture of the test question to be stored in the database. The completeness can be determined according to the key word information of the test question in the first test question information and the test question keyword information in the second test question information. For example, when the first test question information The key text information of the test questions in the test question information and the test question keyword information in the second test question information are completely consistent, then it is judged that the completeness of the second picture parameter is 100%, the first test question information in the initial test question bank contains the second test question information, and it is judged that The completeness in the second picture parameter is less than 100%, specifically, the completeness can be set to 0. Alternatively, the completeness is determined according to the second test item information, and the completeness in the second picture parameter may be judged according to the semantic information of the second test item information. It can be understood that in this embodiment, by analyzing the pictures of the test questions to be stored, the quantitative calculation of the parameters of the second picture is realized, so that more accurate comparison and optimization can be performed based on the parameters of the second picture. It should be noted that the calculation method of the first picture parameter of the initial test question picture is consistent with the calculation method of the second picture parameter, so as to ensure the accuracy of the subsequent comparison.
如图4所示,在一个实施例中,根据第二试题信息确定完整度,包括:As shown in Figure 4, in one embodiment, the completeness is determined according to the second test question information, including:
步骤104F1,分别对第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果;Step 104F1, respectively analyzing the test question key text information, picture information and table information in the second test question information, detecting whether the numbers corresponding to the question numbers in the test question key text information are continuous, and obtaining the first detection result;
步骤104F2,在第二试题信息中检测是否存在与试题关键文字信息语义一致的图片信息或表格信息,得到第二检测结果;Step 104F2, detecting whether there is picture information or table information consistent with the semantics of the key text information of the test question in the second test question information, and obtaining the second test result;
步骤104F3,根据第一检测结果和第二检测结果确定完整度。Step 104F3, determine the completeness according to the first detection result and the second detection result.
在这个实施例中,分别对第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果,当题号对应的数字连续时,判定第一检测结果为完整,当题号对应的数字不连续时,判定第一检测结果为不完整,例如,试题关键文字信息有小题(1)而无小题(2)等情形。在第二试题信息中检测是否存在与试题关键文字信息语义一致的图片信息或表格信息,当存在与试题关键文字信息语义一致的图片信息或表格信息时,判定第二检测结果为完整,当不存在与试题关键文字信息语义一致的图片信息或表格信息时,判定第二检测结果为不完整,例如,试题关键文字中包含“如图”、“见表”等,但第二试题信息中不存在图片信息、表格信息,实现了对第二图片参数中的完整度的高效检测。In this embodiment, the test question key text information, picture information and table information in the second test question information are respectively analyzed to detect whether the numbers corresponding to the question numbers in the test question key text information are continuous, and the first detection result is obtained. When the number corresponding to the question number is continuous, the first test result is determined to be complete; when the number corresponding to the question number is not continuous, the first test result is determined to be incomplete. For example, the key text information of the test question has subtitle (1) but no subtitle (2) etc. Detect whether there is picture information or table information consistent with the semantics of the key text information of the test question in the second test question information, and when there is picture information or table information consistent with the semantics of the key text information of the test question, it is determined that the second detection result is complete. When there is picture information or table information that is semantically consistent with the key text information of the test question, it is determined that the second test result is incomplete, for example, the key text of the test question contains "picture", "see table", etc. There are picture information and table information, which realizes the efficient detection of the completeness of the second picture parameters.
如图5所示,在一个实施例中,将候选图片的第一图片参数与第二图片参数按照预设的比对规则进行比对,包括:As shown in FIG. 5, in one embodiment, the first picture parameter and the second picture parameter of the candidate picture are compared according to a preset comparison rule, including:
步骤110A,获取图片文件内存、分辨率、颜色值及完整度对应的预设权重;Step 110A, obtain the preset weights corresponding to the picture file memory, resolution, color value and completeness;
步骤110B,针对第一图片参数,基于图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第一目标参数;Step 110B, for the first picture parameter, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight, to obtain the first target parameter;
步骤110C,针对第二图片参数,基于图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第二目标参数;Step 110C, for the second picture parameters, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weights to obtain the second target parameters;
步骤110D,当第二目标参数大于第一目标参数时,判定第二图片参数优于第一图片参数。Step 110D, when the second target parameter is greater than the first target parameter, it is determined that the second picture parameter is better than the first picture parameter.
在这个实施例中,预先获取图片文件内存、分辨率、颜色值及完整度对应的预设权重,然后基于第一图片参数和第二图片参数中的各个参数值进行加权求和计算,从而实现了对第一图片参数和第二图片参数的量化计算,得到具体数值,保证了对比的准确性和全面性。In this embodiment, preset weights corresponding to image file memory, resolution, color value, and completeness are obtained in advance, and then weighted summation calculations are performed based on each parameter value in the first image parameter and the second image parameter, thereby realizing The quantitative calculation of the parameters of the first picture and the parameters of the second picture is carried out to obtain specific values, which ensures the accuracy and comprehensiveness of the comparison.
在一个实施例中,基于第二试题信息,在初始试题图片库中进行检索,包括:将第一试题信息作为初始试题图片的第一索引值,并将第二试题信息作为待入库试题图片的第二索引值;在多个第一索引值中进行检索,查找是否存在与第二索引值一致的第一索引值。In one embodiment, based on the second test question information, searching in the initial test question picture library includes: using the first test question information as the first index value of the initial test question picture, and using the second test question information as the test question picture to be stored in the library of the second index value; searching among multiple first index values to find out whether there is a first index value consistent with the second index value.
具体地,将第一试题信息作为初始试题图片的第一索引值,将第二试题信息作为待入库试题图片的第二索引值,在多个第一索引值中进行检索,查找是否存在与第二索引值一致的第一索引值,因此只需匹配第一索引值和第二索引值,提高了检索效率。Specifically, the first test question information is used as the first index value of the initial test question picture, and the second test question information is used as the second index value of the test question picture to be stored in the library, and a plurality of first index values are searched to find out whether there is a The second index value is consistent with the first index value, so it only needs to match the first index value and the second index value, which improves retrieval efficiency.
在一个实施例中,在并将待入库试题图片入库至第二试题图片库之后,方法还包括:当检测到用户答题指令时,获取用户答题指令中包含的目标索引值;根据目标索引值,在初始试题图片库及第二题图片库种查找对应的目标试题图片;将目标试题图片发送给用户进行答题。In one embodiment, after storing the test question pictures to be stored in the second test question picture library, the method further includes: when the user answering instruction is detected, acquiring the target index value contained in the user answering instruction; value, search for the corresponding target test question picture in the initial test question picture library and the second question picture library; send the target test question picture to the user for answering.
具体地,由于目标试题图片是进行迭代优化后的试题图片,从而始终保持用户使用的都是截止目前品质最优的图片题,提高了用户体验。Specifically, since the target test question picture is an iteratively optimized test question picture, it is always kept that the user uses the picture question with the best quality so far, which improves the user experience.
如图6所示,在一个实施例中,提出了一种试题图片优化装置,所述装置包括:As shown in Figure 6, in one embodiment, a device for optimizing test question images is proposed, the device comprising:
构建模块602,用于构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;A construction module 602, configured to construct an initial test question picture library, the initial test question picture library including a plurality of initial test question pictures and first test question information and first picture parameters of each of the initial test question pictures;
接收模块604,用于当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;The receiving module 604 is configured to obtain the picture of the test question to be stored included in the picture storage instruction when receiving the picture storage instruction, identify the test question picture to be stored, and obtain the test question picture to be stored The second test question information and the second picture parameters;
检索模块606,用于基于所述第二试题信息,在所述初始试题图片库中进行检索;A retrieval module 606, configured to search in the initial test question picture library based on the second test question information;
确定模块608,用于若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;A determining module 608, configured to use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture if there is first test question information consistent with the second test question information;
比对模块610,用于将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;A comparison module 610, configured to compare the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and if the second picture parameter is better than the first picture parameter , delete the candidate picture, and store the test question picture to be stored in the initial test question picture library;
入库模块612,用于若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。The storage module 612 is configured to construct a second test question image library if there is no first test item information consistent with the second test item information, and store the test question pictures to be stored into the second test item image library.
在一个实施例中,接收模块包括:In one embodiment, the receiving module includes:
第一调整单元,用于在启动所述拍摄设备的拍照界面时设置拍摄框,调整所述图片题位于所述拍摄框内;A first adjustment unit, configured to set a shooting frame when starting the camera interface of the shooting device, and adjust the picture title to be located in the shooting frame;
第二调整单元,用于当检测到所述图片题的题号信息时,根据所述题号信息及对应的题号位置在所述拍摄框中设置至少一个子拍摄框,调整各个所述子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,得到所述待入库试题图片。The second adjustment unit is configured to set at least one sub-frame in the frame according to the frame information and the corresponding position of the frame when detecting the frame number information of the picture frame, and adjust each of the frame frames. The intervals between the shooting frames are consistent with the intervals between the various question numbers to obtain the pictures of the test questions to be stored.
在一个实施例中,接收模块还包括:In one embodiment, the receiving module also includes:
识别单元,用于采用光学字符识别方法对所述初始试题图片进行识别,得到所述第一试题信息,并采用光学字符识别方法对所述待入库试题图片进行识别,得到所述第二试题信息;The recognition unit is configured to use an optical character recognition method to recognize the picture of the initial test question to obtain the information of the first test question, and use an optical character recognition method to recognize the picture of the test question to be stored in the database to obtain the second test question information;
计算单元,用于获取所述待入库试题图片的像素信息,基于所述像素信息计算得到所述分辨率和所述图片文件内存;A calculation unit, configured to obtain pixel information of the picture of the test question to be stored, and calculate the resolution and the memory of the picture file based on the pixel information;
第一确定单元,用于获取所述待入库试题图片的色深和位深,基于所述色深和位深确定所述颜色值;A first determining unit, configured to acquire the color depth and bit depth of the picture of the test question to be stored, and determine the color value based on the color depth and bit depth;
第二确定单元,用于基于所述第一试题信息中的试题关键文字信息及所述第二试题信息中的试题关键字信息确定所述完整度;或者,根据所述第二试题信息确定所述完整度。The second determining unit is configured to determine the completeness based on the test question key word information in the first test question information and the test question keyword information in the second test question information; or, determine the completeness according to the second test question information completeness of description.
在一个实施例中,第二确定单元包括:In one embodiment, the second determination unit includes:
分析子单元,用于分别对所述第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测所述试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果;The analysis subunit is used to analyze the test question key text information, picture information and table information in the second test question information, and detect whether the numbers corresponding to the question numbers in the test question key text information are continuous, and obtain the first detection result;
检测子单元,用于在所述第二试题信息中检测是否存在与所述试题关键文字信息语义一致的图片信息或表格信息,得到第二检测结果;The detection subunit is used to detect whether there is picture information or table information consistent with the semantics of the key text information of the test item in the second test item information, and obtain a second test result;
确定子单元,用于根据所述第一检测结果和所述第二检测结果确定所述完整度。A determining subunit, configured to determine the completeness according to the first detection result and the second detection result.
在一个实施例中,比对模块包括:In one embodiment, the comparison module includes:
获取单元,用于获取所述图片文件内存、分辨率、颜色值及完整度对应的预设权重;An acquisition unit, configured to acquire preset weights corresponding to memory, resolution, color value and integrity of the image file;
第一计算单元,用于针对所述第一图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第一目标参数;The first calculation unit is configured to perform weighted calculations for the first picture parameters based on the picture file memory, resolution, color value and integrity and corresponding preset weights to obtain the first target parameters;
第一计算单元,用于针对所述第二图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第二目标参数;The first calculation unit is configured to perform weighted calculations for the second picture parameters based on the picture file memory, resolution, color value and completeness and corresponding preset weights to obtain second target parameters;
第三确定单元,用于当所述第二目标参数大于所述第一目标参数时,判定所述第二图片参数优于所述第一图片参数。A third determining unit, configured to determine that the second picture parameter is better than the first picture parameter when the second target parameter is greater than the first target parameter.
在一个实施例中,检索模块包括:In one embodiment, the retrieval module includes:
标识单元,用于将所述第一试题信息作为所述初始试题图片的第一索引值,并将所述第二试题信息作为所述待入库试题图片的第二索引值;An identification unit, configured to use the first test question information as the first index value of the initial test question picture, and use the second test question information as the second index value of the test question picture to be stored;
查找单元,用于在多个第一索引值中进行检索,查找是否存在与所述第二索引值一致的所述第一索引值。A searching unit, configured to search among a plurality of first index values, and find whether there is the first index value consistent with the second index value.
在一个实施例中,该试题图片优化装置还包括:In one embodiment, the test question picture optimization device also includes:
检测模块,用于当检测到用户答题指令时,获取所述用户答题指令中包含的目标索引值;A detection module, configured to obtain the target index value contained in the user answering instruction when the user answering instruction is detected;
查找模块,用于根据所述目标索引值,在所述初始试题图片库及所述第二题图片库种查找对应的目标试题图片;A search module, configured to search for a corresponding target test question picture in the initial test question picture library and the second question picture library according to the target index value;
发送模块,用于将所述目标试题图片发送给所述用户进行答题。A sending module, configured to send the target test question picture to the user for answering the question.
图7示出了一个实施例中计算机设备的内部结构图。该计算机设备具体可以是服务器,所述服务器包括但不限于高性能计算机和高性能计算机集群。如图7所示,该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,存储器包括非易失性存储介质和内存储器。该计算机设备的非易失性存储介质存储有操作系统,还可存储有计算机可读指令计算机可读指令,该计算机可读指令计算机可读指令被处理器执行时,可使得处理器实现试题图片优化方法。该内存储器中也可储存有计算机可读指令计算机可读指令,该计算机可读指令计算机可读指令被处理器执行时,可使得处理器执行试题图片优化方法。本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Figure 7 shows a diagram of the internal structure of a computer device in one embodiment. Specifically, the computer device may be a server, and the server includes but is not limited to a high-performance computer and a cluster of high-performance computers. As shown in FIG. 7, the computer device includes a processor, a memory, and a network interface connected through a system bus. Wherein, the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system, and may also store computer-readable instructions. When the computer-readable instructions are executed by the processor, the computer-readable instructions can cause the processor to implement Optimization. The internal memory may also store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the test question picture optimization method. Those skilled in the art can understand that the structure shown in Figure 7 is only a block diagram of a part of the structure related to the solution of this application, and does not constitute a limitation to the computer equipment on which the solution of this application is applied. The specific computer equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,本申请提供的试题图片优化方法可以实现为一种计算机可读指令计算机可读指令的形式,计算机可读指令计算机可读指令可在如图7所示的计算机设备上运行。计算机设备的存储器中可存储组成试题图片优化装置的各个程序模板。比如,构建模块602,接收模块604,检索模块606,确定模块608,比对模块610,入库模块612。In one embodiment, the test question picture optimization method provided by the present application can be realized in the form of a computer readable instruction computer readable instruction, and the computer readable instruction computer readable instruction can be run on a computer device as shown in FIG. 7 . Various program templates constituting the test question picture optimization device can be stored in the memory of the computer equipment. For example, a construction module 602 , a receiving module 604 , a retrieval module 606 , a determination module 608 , a comparison module 610 , and a storage module 612 .
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令计算机可读指令,所述处理器执行所述计算机可读指令计算机可读指令时实现如下步骤:构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;基于所述第二试题信息,在所述初始试题图片库中进行检索;若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。A computer device comprising a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, the processor executing the computer readable instructions The following steps are implemented during the instruction: constructing an initial test question picture library, said initial test question picture storehouse comprising a plurality of initial test question pictures and the first test question information and first picture parameters of each said initial test question picture; when receiving the picture storage instruction , obtain the picture of the test question to be stored in the instruction for storing the picture, identify the picture of the test question to be stored in the store, and obtain the second test question information and the second picture parameters of the picture of the test question to be stored in the store; based on the The second test question information is searched in the initial test question picture library; if there is the first test question information consistent with the second test question information, the initial test question corresponding to the first test question information consistent with the second test question information A picture is used as a candidate picture; comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter, Deleting the candidate picture, and storing the test question picture to be stored in the initial test question picture storehouse; if there is no first test question information consistent with the second test question information, then constructing the second test question picture storehouse, and The pictures of the test questions to be stored are stored in the second test question picture database.
在一个实施例中,所述待入库试题图片是通过控制拍摄设备按照预设的拍照方式对图片题进行拍照得到,所述预设的拍照方式包括:在启动所述拍摄设备的拍照界面时设置拍摄框,调整所述图片题位于所述拍摄框内;当检测到所述图片题的题号信息时,根据所述题号信息及对应的题号位置在所述拍摄框中设置至少一个子拍摄框,调整各个所述子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,得到所述待入库试题图片。In one embodiment, the picture of the test questions to be stored is obtained by controlling the shooting device to take pictures of the picture questions according to a preset way of taking pictures, and the preset way of taking pictures includes: Set the shooting frame, adjust the picture title to be located in the shooting frame; when the question number information of the picture question is detected, set at least one in the shooting frame according to the question number information and the corresponding question number position Sub-shooting frames, adjust the intervals of each sub-shooting frame to be consistent with the intervals between each question number, and shoot to obtain the pictures of the test questions to be stored.
在一个实施例中,所述第二试题信息和/或第一试题信息包括试题关键文字信息,所述第二图片参数和/或第一图片参数包括图片文件内存、分辨率、颜色值及完整度;所述对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数,包括:采用光学字符识别方法对所述初始试题图片进行识别,得到所述第一试题信息,并采用光学字符识别方法对所述待入库试题图片进行识别,得到所述第二试题信息;获取所述待入库试题图片的像素信息,基于所述像素信息计算得到所述分辨率和所述图片文件内存;获取所述待入库试题图片的色深和位深,基于所述色深和位深确定所述颜色值;基于所述第一试题信息中的试题关键文字信息及所述第二试题信息中的试题关键字信息确定所述完整度;或者,根据所述第二试题信息确定所述完整度。In one embodiment, the second test question information and/or the first test question information includes test question key text information, and the second picture parameters and/or first picture parameters include picture file memory, resolution, color value and completeness. degree; the identifying the picture of the test question to be stored in the database, and obtaining the second test question information and the second picture parameters of the picture of the test question to be stored in the database, includes: using an optical character recognition method to identify the initial test question picture, Obtaining the first test item information, and using an optical character recognition method to identify the picture of the test question to be stored, and obtaining the second test item information; acquiring the pixel information of the picture of the test question to be stored, based on the pixel information Calculate the resolution and the image file memory; obtain the color depth and bit depth of the test question picture to be stored, and determine the color value based on the color depth and bit depth; based on the first test question information The completeness is determined according to the key text information of the test question and the key word information of the test question in the second test question information; or, the completeness is determined according to the second test question information.
在一个实施例中,所述根据所述第二试题信息确定所述完整度,包括:分别对所述第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测所述试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果;在所述第二试题信息中检测是否存在与所述试题关键文字信息语义一致的图片信息或表格信息,得到第二检测结果;根据所述第一检测结果和所述第二检测结果确定所述完整度。In one embodiment, the determining the completeness according to the second test item information includes: respectively analyzing the test item key text information, picture information and form information in the second test item information, and detecting the test item Whether the number corresponding to the question number in the key text information is continuous, obtains the first test result; detects whether there is picture information or form information consistent with the semantics of the key text information of the test question in the second test question information, and obtains the second test result Result; determining the completeness according to the first detection result and the second detection result.
在一个实施例中,所述将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,包括:获取所述图片文件内存、分辨率、颜色值及完整度对应的预设权重;针对所述第一图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第一目标参数;针对所述第二图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第二目标参数;当所述第二目标参数大于所述第一目标参数时,判定所述第二图片参数优于所述第一图片参数。In one embodiment, the comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule includes: acquiring the memory, resolution, and color value of the picture file and the preset weight corresponding to the completeness; for the first picture parameter, weighted calculation is performed based on the picture file memory, resolution, color value and completeness and the corresponding preset weight to obtain the first target parameter; for the first picture parameter The second picture parameter is weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the second target parameter; when the second target parameter is greater than the first target parameters, it is determined that the second picture parameter is better than the first picture parameter.
在一个实施例中,所述基于所述第二试题信息,在所述初始试题图片库中进行检索,包括:将所述第一试题信息作为所述初始试题图片的第一索引值,并将所述第二试题信息作为所述待入库试题图片的第二索引值;在多个第一索引值中进行检索,查找是否存在与所述第二索引值一致的所述第一索引值。In one embodiment, the searching in the initial test question picture library based on the second test question information includes: using the first test question information as the first index value of the initial test question picture, and setting The second test question information is used as the second index value of the test question picture to be stored in the library; searching among multiple first index values to find out whether there is the first index value consistent with the second index value.
在一个实施例中,在所述并将所述待入库试题图片入库至所述第二试题图片库之后,所述方法还包括:当检测到用户答题指令时,获取所述用户答题指令中包含的目标索引值;根据所述目标索引值,在所述初始试题图片库及所述第二题图片库种查找对应的目标试题图片;将所述目标试题图片发送给所述用户进行答题。In one embodiment, after storing the test question pictures to be stored in the second test question picture library, the method further includes: when a user answering instruction is detected, acquiring the user answering instruction The target index value contained in; according to the target index value, search for the corresponding target test picture in the initial test picture library and the second question picture library; send the target test picture to the user for answering .
一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令计算机可读指令,其特征在于,所述计算机可读指令计算机可读指令被处理器执行时实现如下步骤:构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;基于所述第二试题信息,在所述初始试题图片库中进行检索;若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。A computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions computer-readable instructions, characterized in that, when the computer-readable instructions are executed by a processor, the following steps are implemented: constructing An initial test question picture library, the initial test question picture bank includes a plurality of initial test question pictures and the first test question information and first picture parameters of each of the initial test question pictures; The picture of the test question to be stored in the library instruction is identified, and the second test question information and the second picture parameters of the picture of the test question to be stored in the picture are obtained; based on the second test question information, in Retrieve in the initial test question picture library; if there is the first test question information consistent with the second test question information, then use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture; The first picture parameter of the candidate picture is compared with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter, the candidate picture is deleted, and Put the pictures of the test questions to be stored into the initial test question picture library; if there is no first test question information consistent with the second test question information, build a second test question picture library, and store the test question pictures to be stored Stored in the second test question image library.
在一个实施例中,所述待入库试题图片是通过控制拍摄设备按照预设的拍照方式对图片题进行拍照得到,所述预设的拍照方式包括:在启动所述拍摄设备的拍照界面时设置拍摄框,调整所述图片题位于所述拍摄框内;当检测到所述图片题的题号信息时,根据所述题号信息及对应的题号位置在所述拍摄框中设置至少一个子拍摄框,调整各个所述子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,得到所述待入库试题图片。In one embodiment, the picture of the test questions to be stored is obtained by controlling the shooting device to take pictures of the picture questions according to a preset way of taking pictures, and the preset way of taking pictures includes: Set the shooting frame, adjust the picture title to be located in the shooting frame; when the question number information of the picture question is detected, set at least one in the shooting frame according to the question number information and the corresponding question number position Sub-shooting frames, adjust the intervals of each sub-shooting frame to be consistent with the intervals between each question number, and shoot to obtain the pictures of the test questions to be stored.
在一个实施例中,所述第二试题信息和/或第一试题信息包括试题关键文字信息,所述第二图片参数和/或第一图片参数包括图片文件内存、分辨率、颜色值及完整度;所述对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数,包括:采用光学字符识别方法对所述初始试题图片进行识别,得到所述第一试题信息,并采用光学字符识别方法对所述待入库试题图片进行识别,得到所述第二试题信息;获取所述待入库试题图片的像素信息,基于所述像素信息计算得到所述分辨率和所述图片文件内存;获取所述待入库试题图片的色深和位深,基于所述色深和位深确定所述颜色值;基于所述第一试题信息中的试题关键文字信息及所述第二试题信息中的试题关键字信息确定所述完整度;或者,根据所述第二试题信息确定所述完整度。In one embodiment, the second test question information and/or the first test question information includes test question key text information, and the second picture parameters and/or first picture parameters include picture file memory, resolution, color value and completeness. degree; the identifying the picture of the test question to be stored in the database, and obtaining the second test question information and the second picture parameters of the picture of the test question to be stored in the database, includes: using an optical character recognition method to identify the initial test question picture, Obtaining the first test item information, and using an optical character recognition method to identify the picture of the test question to be stored, and obtaining the second test item information; acquiring the pixel information of the picture of the test question to be stored, based on the pixel information Calculate the resolution and the image file memory; obtain the color depth and bit depth of the test question picture to be stored, and determine the color value based on the color depth and bit depth; based on the first test question information The completeness is determined according to the key text information of the test question and the key word information of the test question in the second test question information; or, the completeness is determined according to the second test question information.
在一个实施例中,所述根据所述第二试题信息确定所述完整度,包括:分别对所述第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测所述试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果;在所述第二试题信息中检测是否存在与所述试题关键文字信息语义一致的图片信息或表格信息,得到第二检测结果;根据所述第一检测结果和所述第二检测结果确定所述完整度。In one embodiment, the determining the completeness according to the second test item information includes: respectively analyzing the test item key text information, picture information and form information in the second test item information, and detecting the test item Whether the number corresponding to the question number in the key text information is continuous, obtains the first test result; detects whether there is picture information or form information consistent with the semantics of the key text information of the test question in the second test question information, and obtains the second test result Result; determining the completeness according to the first detection result and the second detection result.
在一个实施例中,所述将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,包括:获取所述图片文件内存、分辨率、颜色值及完整度对应的预设权重;针对所述第一图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第一目标参数;针对所述第二图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第二目标参数;当所述第二目标参数大于所述第一目标参数时,判定所述第二图片参数优于所述第一图片参数。In one embodiment, the comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule includes: acquiring the memory, resolution, and color value of the picture file and the preset weight corresponding to the completeness; for the first picture parameter, weighted calculation is performed based on the picture file memory, resolution, color value and completeness and the corresponding preset weight to obtain the first target parameter; for the first picture parameter The second picture parameter is weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the second target parameter; when the second target parameter is greater than the first target parameters, it is determined that the second picture parameter is better than the first picture parameter.
在一个实施例中,所述基于所述第二试题信息,在所述初始试题图片库中进行检索,包括:将所述第一试题信息作为所述初始试题图片的第一索引值,并将所述第二试题信息作为所述待入库试题图片的第二索引值;在多个第一索引值中进行检索,查找是否存在与所述第二索引值一致的所述第一索引值。In one embodiment, the searching in the initial test question picture library based on the second test question information includes: using the first test question information as the first index value of the initial test question picture, and setting The second test question information is used as the second index value of the test question picture to be stored in the library; searching among multiple first index values to find out whether there is the first index value consistent with the second index value.
在一个实施例中,在所述并将所述待入库试题图片入库至所述第二试题图片库之后,所述方法还包括:当检测到用户答题指令时,获取所述用户答题指令中包含的目标索引值;根据所述目标索引值,在所述初始试题图片库及所述第二题图片库种查找对应的目标试题图片;将所述目标试题图片发送给所述用户进行答题。In one embodiment, after storing the test question pictures to be stored in the second test question picture library, the method further includes: when a user answering instruction is detected, acquiring the user answering instruction The target index value contained in; according to the target index value, search for the corresponding target test picture in the initial test picture library and the second question picture library; send the target test picture to the user for answering .
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令计算机可读指令来指令相关的硬件来完成,所述的程序可存储于一非易失性计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be realized by computer-readable instructions and computer-readable instructions to instruct related hardware, and the program can be stored in a non-volatile In the computer-readable storage medium, when the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Wherein, any references to memory, storage, database or other media used in the various embodiments provided in the present application may include non-volatile and/or volatile memory. Nonvolatile memory can include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对本申请范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above-mentioned embodiments only express several implementation modes of the present application, and the description thereof is relatively specific and detailed, but should not be construed as limiting the scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims (10)

  1. 一种试题图片优化方法,其特征在于,所述方法包括:A test question picture optimization method is characterized in that the method comprises:
    构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;Constructing an initial test question picture library, said initial test question picture bank comprising a plurality of initial test question pictures and first test question information and first picture parameters of each said initial test question picture;
    当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;When receiving the image storage instruction, obtain the test question picture to be stored in the picture storage instruction, identify the test question picture to be stored, and obtain the second test item information and the test question picture to be stored in the storage. Second picture parameter;
    基于所述第二试题信息,在所述初始试题图片库中进行检索;Searching in the initial test question image library based on the second test question information;
    若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;If there is first test item information consistent with the second test item information, the initial test item picture corresponding to the first test item information consistent with the second test item information is used as a candidate picture;
    将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;comparing the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and deleting the candidate picture when the second picture parameter is better than the first picture parameter , and store the picture of the test question to be stored into the library of the initial test question picture;
    若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。If there is no first test item information consistent with the second test item information, a second test item image library is constructed, and the test item images to be stored are stored in the second test item image library.
  2. 根据权利要求1所述的试题图片优化方法,其特征在于,所述待入库试题图片是通过控制拍摄设备按照预设的拍照方式对图片题进行拍照得到,所述预设的拍照方式包括:The test question picture optimization method according to claim 1, wherein the test question picture to be stored is obtained by controlling the photographing device to take pictures of the picture questions according to a preset photographing mode, and the preset photographing mode includes:
    在启动所述拍摄设备的拍照界面时设置拍摄框,调整所述图片题位于所述拍摄框内;When starting the photographing interface of the photographing device, a photographing frame is set, and the title of the picture is adjusted to be located in the photographing frame;
    当检测到所述图片题的题号信息时,根据所述题号信息及对应的题号位置在所述拍摄框中设置至少一个子拍摄框,调整各个所述子拍摄框的间隔与各个题号之间的间隔一致进行拍摄,得到所述待入库试题图片。When the question number information of the picture question is detected, at least one sub-shooting frame is set in the shooting frame according to the question number information and the corresponding question number position, and the interval between each sub-shooting frame and each question are adjusted. The intervals between the numbers are consistent to shoot, and the pictures of the test questions to be stored are obtained.
  3. 根据权利要求1所述的试题图片优化方法,其特征在于,所述第二试题信息和/或第一试题信息包括试题关键文字信息,所述第二图片参数和/或第一图片参数包括图片文件内存、分辨率、颜色值及完整度;所述对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数,包括:The test question picture optimization method according to claim 1, wherein the second test question information and/or the first test question information includes test question key text information, and the second picture parameter and/or the first picture parameter includes a picture File memory, resolution, color value and completeness; said identifying the picture of the test question to be stored in the database, and obtaining the second test question information and the second picture parameters of the picture of the test question to be stored in the database, including:
    采用光学字符识别方法对所述初始试题图片进行识别,得到所述第一试题信息,并采用光学字符识别方法对所述待入库试题图片进行识别,得到所述第二试题信息;Using an optical character recognition method to recognize the initial test question picture to obtain the first test question information, and using an optical character recognition method to recognize the test question picture to be stored to obtain the second test question information;
    获取所述待入库试题图片的像素信息,基于所述像素信息计算得到所述分辨率和所述图片文件内存;Obtain the pixel information of the picture of the test question to be stored, and calculate the resolution and the memory of the picture file based on the pixel information;
    获取所述待入库试题图片的色深和位深,基于所述色深和位深确定所述颜色值;Acquiring the color depth and bit depth of the picture of the test question to be stored, and determining the color value based on the color depth and bit depth;
    基于所述第一试题信息中的试题关键文字信息及所述第二试题信息中的试题关键字信息确定所述完整度;或者,根据所述第二试题信息确定所述完整度。The completeness is determined based on the key word information of the test question in the first test question information and the test question keyword information in the second test question information; or, the completeness is determined according to the second test question information.
  4. 根据权利要求1所述的试题图片优化方法,其特征在于,所述根据所述第二试题信息确定所述完整度,包括:The test question picture optimization method according to claim 1, wherein said determining said completeness according to said second test question information comprises:
    分别对所述第二试题信息中的试题关键文字信息、图片信息及表格信息进行分析,检测所述试题关键文字信息中的题号对应的数字是否连续,得到第一检测结果;Analyzing the test question key text information, picture information and table information in the second test question information respectively, detecting whether the numbers corresponding to the question numbers in the test question key text information are continuous, and obtaining the first detection result;
    在所述第二试题信息中检测是否存在与所述试题关键文字信息语义一致的图片信息或表格信息,得到第二检测结果;Detecting whether there is picture information or form information consistent with the semantics of the key text information of the test in the second test item information, and obtaining a second test result;
    根据所述第一检测结果和所述第二检测结果确定所述完整度。The completeness is determined based on the first detection result and the second detection result.
  5. 根据权利要求3所述的试题图片优化方法,其特征在于,所述将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,包括:The test question picture optimization method according to claim 3, wherein said comparing the first picture parameter of said candidate picture with said second picture parameter according to a preset comparison rule comprises:
    获取所述图片文件内存、分辨率、颜色值及完整度对应的预设权重;Acquiring preset weights corresponding to memory, resolution, color value and completeness of the image file;
    针对所述第一图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第一目标参数;For the first picture parameter, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the first target parameter;
    针对所述第二图片参数,基于所述图片文件内存、分辨率、颜色值及完整度及对应的预设权重进行加权计算,得到第二目标参数;For the second picture parameter, perform weighted calculation based on the picture file memory, resolution, color value and integrity and the corresponding preset weight to obtain the second target parameter;
    当所述第二目标参数大于所述第一目标参数时,判定所述第二图片参数优于所述第一图片参数。When the second target parameter is greater than the first target parameter, it is determined that the second picture parameter is better than the first picture parameter.
  6. 根据权利要求2所述的试题图片优化方法,其特征在于,所述基于所述第二试题信息,在所述初始试题图片库中进行检索,包括:The test question picture optimization method according to claim 2, wherein said searching in said initial test question picture library based on said second test question information includes:
    将所述第一试题信息作为所述初始试题图片的第一索引值,并将所述第二试题信息作为所述待入库试题图片的第二索引值;Using the first test question information as the first index value of the initial test question picture, and using the second test question information as the second index value of the test question picture to be stored;
    在多个第一索引值中进行检索,查找是否存在与所述第二索引值一致的所述第一索引值。Searching among multiple first index values to find out whether there is the first index value consistent with the second index value.
  7. 根据权利要求6所述的试题图片优化方法,其特征在于,在所述并将所述待入库试题图片入库至所述第二试题图片库之后,所述方法还包括:The test question picture optimization method according to claim 6, characterized in that, after storing the test question picture to be stored in the second test question picture library, the method further comprises:
    当检测到用户答题指令时,获取所述用户答题指令中包含的目标索引值;When the user answering instruction is detected, the target index value contained in the user answering instruction is obtained;
    根据所述目标索引值,在所述初始试题图片库及所述第二题图片库种查找对应的目标试题图片;According to the target index value, search for a corresponding target test question picture in the initial test question picture library and the second question picture library;
    将所述目标试题图片发送给所述用户进行答题。Sending the picture of the target test question to the user for answering the question.
  8. 一种试题图片优化装置,其特征在于,所述试题图片优化装置包括:A test question picture optimization device, characterized in that the test question picture optimization device comprises:
    构建模块,用于构建初始试题图片库,所述初始试题图片库包含多张初始试题图片及每张所述初始试题图片的第一试题信息及第一图片参数;A construction module for constructing an initial test question image library, the initial test question image library including a plurality of initial test question pictures and first test question information and first picture parameters of each of the initial test question pictures;
    接收模块,用于当接收到图片入库指令时,获取所述图片入库指令中包含的待入库试题图片,对所述待入库试题图片进行识别,得到所述待入库试题图片的第二试题信息和第二图片参数;The receiving module is configured to obtain the picture of the test questions to be stored included in the picture storage instruction when receiving the picture storage instruction, identify the picture of the test questions to be stored, and obtain the picture of the test questions to be stored The second test question information and the second picture parameters;
    检索模块,用于基于所述第二试题信息,在所述初始试题图片库中进行检索;A retrieval module, configured to search in the initial test question picture library based on the second test question information;
    确定模块,用于若存在与第二试题信息一致的第一试题信息,则将与所述第二试题信息一致的第一试题信息对应的初始试题图片作为候选图片;A determining module, configured to use the initial test question picture corresponding to the first test question information consistent with the second test question information as a candidate picture if there is first test question information consistent with the second test question information;
    比对模块,用于将所述候选图片的第一图片参数与所述第二图片参数按照预设的比对规则进行比对,在所述第二图片参数优于所述第一图片参数时,删除所述候选图片,并将所述待入库试题图片入库至所述初始试题图片库;A comparison module, configured to compare the first picture parameter of the candidate picture with the second picture parameter according to a preset comparison rule, and when the second picture parameter is better than the first picture parameter , deleting the candidate picture, and storing the test question picture to be stored in the initial test question picture library;
    入库模块,用于若不存在与第二试题信息一致的第一试题信息,则构建第二试题图片库,并将所述待入库试题图片入库至所述第二试题图片库。The storage module is configured to construct a second test question picture library if there is no first test question information consistent with the second test question information, and store the test question pictures to be stored into the second test question picture bank.
  9. 一种计算机设备,其特征在于,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令计算机可读指令,其特征在于,所述处理器执行所述计算机可读指令计算机可读指令时实现如权利要求1至7任一项所述试题图片优化方法的步骤。A computer device, characterized in that it comprises a memory, a processor, and computer readable instructions stored in the memory and executable on the processor, wherein the processor executes the When the computer-readable instructions are computer-readable instructions, the steps of the test question picture optimization method according to any one of claims 1 to 7 are realized.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令计算机可读指令,其特征在于,所述计算机可读指令计算机可读指令被处理器执行时实现如权利要求1至7任一项所述试题图片优化方法的步骤。A computer-readable storage medium, the computer-readable storage medium stores computer-readable instructions and computer-readable instructions, characterized in that, when the computer-readable instructions are executed by a processor, the computer-readable instructions of claim 1 are implemented. Steps in the test question image optimization method described in any one of 7 to 7.
PCT/CN2021/103866 2021-06-30 2021-06-30 Test question picture optimization method and apparatus, computer device and storage medium WO2023272660A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/103866 WO2023272660A1 (en) 2021-06-30 2021-06-30 Test question picture optimization method and apparatus, computer device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/103866 WO2023272660A1 (en) 2021-06-30 2021-06-30 Test question picture optimization method and apparatus, computer device and storage medium

Publications (1)

Publication Number Publication Date
WO2023272660A1 true WO2023272660A1 (en) 2023-01-05

Family

ID=84689880

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/103866 WO2023272660A1 (en) 2021-06-30 2021-06-30 Test question picture optimization method and apparatus, computer device and storage medium

Country Status (1)

Country Link
WO (1) WO2023272660A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590212A (en) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 The Input System and method of a kind of face picture
CN111209734A (en) * 2020-01-13 2020-05-29 浙江蓝鸽科技有限公司 Test question duplication eliminating method and system
CN112819509A (en) * 2021-01-18 2021-05-18 上海携程商务有限公司 Method, system, electronic device and storage medium for automatically screening advertisement pictures
CN112861864A (en) * 2021-01-28 2021-05-28 广东国粒教育技术有限公司 Topic entry method, topic entry device, electronic device and computer-readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107590212A (en) * 2017-08-29 2018-01-16 深圳英飞拓科技股份有限公司 The Input System and method of a kind of face picture
CN111209734A (en) * 2020-01-13 2020-05-29 浙江蓝鸽科技有限公司 Test question duplication eliminating method and system
CN112819509A (en) * 2021-01-18 2021-05-18 上海携程商务有限公司 Method, system, electronic device and storage medium for automatically screening advertisement pictures
CN112861864A (en) * 2021-01-28 2021-05-28 广东国粒教育技术有限公司 Topic entry method, topic entry device, electronic device and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN111062871B (en) Image processing method and device, computer equipment and readable storage medium
US11461392B2 (en) Providing relevant cover frame in response to a video search query
US11688191B2 (en) Contextually disambiguating queries
US8634603B2 (en) Automatic media sharing via shutter click
WO2019136993A1 (en) Text similarity calculation method and device, computer apparatus, and storage medium
WO2019052403A1 (en) Training method for image-text matching model, bidirectional search method, and related apparatus
WO2021027540A1 (en) Lost person information matching method and apparatus, computer device, and storage medium
CN110321470A (en) Document processing method, device, computer equipment and storage medium
US9665773B2 (en) Searching for events by attendants
WO2022061806A1 (en) Film production method, terminal device, photographing device, and film production system
GB2560785A (en) Contextually disambiguating queries
WO2021035227A1 (en) Systems and methods for retreiving videos using natural language description
KR102313338B1 (en) Apparatus and method for searching image
US20190364196A1 (en) Method and Apparatus for Generating Shot Information
CN109086386B (en) Data processing method, device, computer equipment and storage medium
WO2023272660A1 (en) Test question picture optimization method and apparatus, computer device and storage medium
JP2020042770A (en) Data search method and data search system
CN114218437A (en) Adaptive picture clipping and fusing method, system, computer device and medium
CN110362703B (en) Picture arranging method and system
TWI693524B (en) Optimization method for searching exclusive personalized pictures
CN113448925A (en) Test question picture optimization method and device, computer equipment and storage medium
WO2021042084A1 (en) Systems and methods for retreiving images using natural language description
CN111985483B (en) Method and device for detecting screen shot file picture and storage medium
KR102209316B1 (en) Method for storing photo recording using metadata and terminals device for performing the method
JP2008017050A (en) Conferenecing system and conferencing method

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21947613

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE