CN117556306A - Method, system, equipment and medium for checking multi-type number format - Google Patents

Method, system, equipment and medium for checking multi-type number format Download PDF

Info

Publication number
CN117556306A
CN117556306A CN202311643585.4A CN202311643585A CN117556306A CN 117556306 A CN117556306 A CN 117556306A CN 202311643585 A CN202311643585 A CN 202311643585A CN 117556306 A CN117556306 A CN 117556306A
Authority
CN
China
Prior art keywords
data
format
checking
verification
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311643585.4A
Other languages
Chinese (zh)
Inventor
吴红建
王林
徐峰宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Yiduoduo Information Technology Co ltd
Original Assignee
Suzhou Yiduoduo Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Yiduoduo Information Technology Co ltd filed Critical Suzhou Yiduoduo Information Technology Co ltd
Priority to CN202311643585.4A priority Critical patent/CN117556306A/en
Publication of CN117556306A publication Critical patent/CN117556306A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method, a system, equipment and a medium for checking a multi-type number format, wherein the method comprises the following steps: obtaining number data to be verified; analyzing the number data to be verified, and extracting target data in the number data to be verified; configuring a multi-type number verification specification; identifying a data type of the target data; confirming reference data of the target data; configuring a checking algorithm based on the multi-type number verification specification; invoking a checking algorithm, and performing format checking on the target data according to the data type and the reference data; prompting an abnormal result according to the checking result of the format check; outputting a test report according to a test result of the format test; the invention can rapidly and accurately check the lottery drawing number formats of different color types through an automatic script mode, and the automatic processing mode can efficiently process a large amount of data, has higher accuracy, avoids errors caused by manual intervention, improves timeliness and saves labor and time cost.

Description

Method, system, equipment and medium for checking multi-type number format
Technical Field
The invention relates to the technical field of data identification, in particular to a method, a system, equipment and a medium for checking a multi-type number format, which are applied to the field of digital color.
Background
At present, verification of the digital lottery winning number in the website is generally realized by manually comparing the result formats of the lottery winning numbers, and the method has the following problems:
in a first aspect, timeliness problems: the manual comparison mode needs a great deal of time and energy, and especially when a plurality of color seeds are involved, more time and cost are consumed; when the lottery numbers are compared manually, an operator usually checks each lottery number one by one and compares the lottery numbers with other lottery numbers, so that the operation is complicated and time-consuming;
second aspect, correctness issues: the factors of manual operation are easy to cause a certain negligence or error, which easily causes errors in comparison verification results and influences data analysis and statistics; in addition, because the memory and processing capacity of people are limited, operators are easy to feel stress when a large number of color seeds and lottery number results are compared, so that a certain error is generated;
in a third aspect, the intelligence problem: manual operation is needed for manual comparison, and the intelligence is poor.
Disclosure of Invention
The present invention is directed to a method, system, apparatus and medium for checking a multi-type number format, thereby solving all or one of the above-mentioned problems in the prior art.
In order to solve the technical problems, the specific technical scheme of the invention is as follows:
in one aspect, the present invention provides a method for checking a multi-type number format, comprising the steps of:
a data acquisition step:
obtaining number data to be verified;
and a data analysis step:
analyzing the number data to be verified, and extracting target data in the number data to be verified;
the specification definition step:
configuring a multi-type number verification specification;
and a format verification step:
identifying a data type of the target data;
confirming reference data of the target data;
configuring a checking algorithm based on the multi-type number verification specification;
invoking the checking algorithm, and performing format checking on the target data according to the data type and the reference data;
an exception handling step:
carrying out abnormal result prompt according to the checking result of the format check;
and outputting a result:
outputting a test report according to the test result of the format test.
As an improved solution, the obtaining the number data to be verified includes:
acquiring the number data to be verified from a website based on a crawler technology and an HTTP request;
and storing the returned number data to be verified as a text file or carrying out database record.
As an improved solution, the parsing the number data to be verified, extracting target data in the number data to be verified, includes:
extracting a target part in the number data to be verified based on a data extraction technology;
and carrying out data structure conversion on the target part to obtain the target data.
As an improvement, the configuring the multi-type number verification specification includes:
setting a number format specification and a check specification which correspond to a plurality of data types respectively;
the number format specification and the verification specification are used as the multi-type number verification specification.
As an improvement, the invoking the checking algorithm performs format checking on the target data according to the data type and the reference data, including:
invoking the checking algorithm, and comparing the number of the target data with the number of the reference data one by one according to the number format specification and the checking specification corresponding to the data type of the target data;
responding to each number of the target data after comparison to meet the corresponding inspection standard, and judging that the target data is inspected to pass;
and judging that the target data is not passed in response to the fact that the number which does not meet the corresponding test specification exists in the target data after comparison.
As an improvement, the method for prompting the abnormal result according to the checking result of the format check comprises the following steps:
creating an abnormal data list;
judging that the target data which fails the inspection is abnormal data;
storing the abnormal data into the abnormal data list;
and returning the abnormal data list to the front end for prompting.
As an improvement, the inspection report includes: error cause information that the abnormal data fails to be checked.
On the other hand, the invention also provides a multi-type number format checking system, which comprises:
the system comprises a data acquisition module, a data analysis module, a specification definition module, a format verification module, an exception processing module and a result output module;
the data acquisition module is used for acquiring the number data to be verified;
the data analysis module is used for analyzing the number data to be verified and extracting target data in the number data to be verified;
the specification definition module is used for configuring a multi-type number verification specification;
the format verification module is used for identifying the data type of the target data; the format verification module confirms the reference data of the target data; the format verification module configures a verification algorithm based on the multi-type number verification specification; the format verification module invokes the verification algorithm to perform format verification on the target data according to the data type and the reference data;
the abnormal processing module is used for prompting an abnormal result according to the checking result of the format check;
and the result output module is used for outputting a test report according to the test result of the format test.
In another aspect, the present invention also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the multi-type number format verification method.
In another aspect, the present invention further provides a computer device, where the computer device includes a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein:
the memory is used for storing a computer program;
the processor is configured to execute the steps of the multi-type number format checking method by running a program stored on the memory.
The technical scheme of the invention has the beneficial effects that:
1. the multi-type number format checking method can realize the quick and accurate checking of the lottery number formats of different colors through an automatic script mode, and the automatic processing mode can effectively process a large amount of data, has higher accuracy, avoids errors caused by manual intervention, improves timeliness and saves labor and time cost; the method supports expansion and flexible configuration, can rapidly cope with new color types or new lottery rules, has stronger adaptability and applicability, supports abnormal number recording, facilitates subsequent data analysis and statistics, overcomes the defects of the prior art, and improves the application value.
2. The multi-type number format checking system can be used for rapidly and accurately checking the lottery number formats of different colors through the mutual matching of the data acquisition module, the data analysis module, the standard definition module, the format verification module, the exception processing module and the result output module, so that the automatic processing mode can be used for effectively checking a large amount of data, has higher accuracy, avoids errors caused by manual intervention, improves timeliness and saves labor and time cost; the method supports expansion and flexible configuration, can rapidly cope with new color types or new lottery rules, has stronger adaptability and applicability, supports abnormal number recording, facilitates subsequent data analysis and statistics, overcomes the defects of the prior art, and improves the application value.
3. The computer readable storage medium can realize the coordination of the guide data acquisition module, the data analysis module, the specification definition module, the format verification module, the exception processing module and the result output module, so as to realize the multi-type number format checking method.
4. The computer equipment can realize the storage and execution of the computer readable storage medium, thereby realizing the multi-type number format checking method.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a multi-type number format checking method according to embodiment 1 of the present invention;
fig. 2 is a schematic code diagram illustrating implementation of step S100 in the multi-type number format checking method according to embodiment 1 of the present invention;
fig. 3 is a schematic code diagram illustrating implementation of step S200 in the multi-type number format checking method according to embodiment 1 of the present invention;
FIG. 4 is a code diagram illustrating the implementation of step S300 in the multi-type number format verification method according to embodiment 1 of the present invention;
fig. 5 is a schematic diagram of implementation codes of step S400 and step S500 in the multi-type number format checking method according to embodiment 1 of the present invention;
fig. 6 is a schematic diagram showing the implementation effect of step S600 in the multi-type number format checking method according to embodiment 1 of the present invention;
FIG. 7 is a schematic diagram of a multi-type number format checking system according to embodiment 2 of the present invention;
FIG. 8 is a schematic diagram of a computer apparatus according to embodiment 4 of the present invention;
the labels in the drawings are illustrated as follows:
1501. a processor; 1502. a communication interface; 1503. a memory; 1504. a communication bus.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making clear and defining the scope of the present invention.
In the description of the present invention, it should be noted that the described embodiments of the present invention are some, but not all embodiments of the present invention; all other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The terms first, second and the like in the description and in the claims and in the above-described figures, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, apparatus, article, or device that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or device.
Example 1
The embodiment provides a multi-type number format checking method, as shown in fig. 1 to 6, comprising the following steps:
as one implementation mode of the invention, the method is based on automatic data acquisition, analysis and analysis operation, and is matched with a programming technology to realize the verification of various digital lottery numbers; based on the method, the number format identification and comparison can be efficiently and accurately carried out, the method is suitable for coping with batch demands, compared with the traditional manual mode, the correctness and the quality of the prize-drawing number confirmation are greatly improved, the specific demands of different colors can be flexibly met, and the method has a wider application range and expansibility;
as an implementation mode of the invention, the method is mainly realized based on Python programming language, wherein, the method combines various technologies such as web crawlers, character string processing, regular expressions, conditional sentences and the like to realize the function of checking and comparing various digital lottery number formats, and the specific steps are as follows:
s100, data acquisition:
in this step, the prize drawing number data (i.e. the number data to be verified) is mainly obtained from the official website, and the specific implementation code is as shown in fig. 2;
specifically, in this embodiment, the corresponding official website is confirmed;
specifically, in this embodiment, a Python programming language and a web crawler technology are adopted, and corresponding prize drawing number data is obtained from the official website through an HTTP request;
specifically, in the present embodiment, the HTTP request is sent using a third party library (Requests);
specifically, in this embodiment, the data requested to be returned is saved as a text file or a database record is performed.
S200, data analysis:
in this step, not all data is required by the method, since the acquired winning data; firstly, the lottery drawing data obtained in the previous step are read and analyzed, then, lottery drawing number data needing format check are extracted from the lottery drawing data, the data are defined as target data, and the specific implementation code is shown in figure 3;
specifically, in this embodiment, the winning number data file stored in the local file or database is read, and the winning number data file is parsed and data extracted by using a data extraction technique;
specifically, in the present embodiment, the data extraction technology includes, but is not limited to: character string processing, regular expression (re), web page parsing library (bs 4) and other technologies;
specifically, in this embodiment, when data extraction is performed, the part (i.e., the target part) where the prize-winning number in the file is located is extracted according to the HTML structure or other data format of the official website; finally, the extracted portions are converted into data structures, such as strings, lists, or dictionaries, etc., that can be processed by the present method.
S300, a specification definition step:
in this step, since the format of the result of the winning number of different color types (i.e. data types) may be different, the rules and requirements of winning are also different, so that the relevant format specification and inspection specification of the winning number are defined for each color type, and the specific implementation code is as shown in fig. 4;
specifically, in the present embodiment, the following prize-winning number format specification and inspection specification are defined for the two-color ball, the happy 8, the happy 3D and the seven-color ball, respectively:
A. fucai double-color ball:
the format specification of the lottery drawing number is as follows: red ball number (6) +blue ball number (1);
the test specifications are: extracting and comparing whether numbers of the red ball and the blue ball are consistent with a lottery result in the service code or not through the script;
B. happy 8:
the format specification of the lottery drawing number is as follows: a number of digits (20);
the test specifications are: extracting and comparing whether the numbers of the lottery numbers are consistent with the lottery drawing results in the service codes or not through scripts;
C. fucai 3D:
the format specification of the lottery drawing number is as follows: a three digit number;
the test specifications are: extracting and comparing whether the three-digit number of the lottery number is consistent with the lottery result in the service code through the script;
D. seven happy colors:
the format specification of the lottery drawing number is as follows: a number of digits (7);
the test specifications are: and extracting and comparing whether the numbers of the lottery numbers are consistent with the lottery drawing results in the service codes or not through the script.
S400, a format verification step:
in the step, confirming the color type of the target data and confirming the lottery result (namely the reference data) corresponding to the color type;
in this step, a check script/algorithm/function/program for format check is configured according to the aforementioned drawing number format specification and check specification; based on the configured checking script/algorithm/function/program, the corresponding format check is carried out on the target data and the corresponding lottery result according to the lottery number format specification and the checking specification defined above, and the specific implementation code is shown in figure 5;
specifically, in this embodiment, the test script is written based on Python;
specifically, in this embodiment, when the test script is run, each winning number to be verified in the target data is compared one by one according to the defined winning number format specification and the test specification, and whether each winning number meets the format requirement of the winning result is determined;
specifically, in this embodiment, the number is checked one by one based on an inspection algorithm;
specifically, in this embodiment, the verification algorithm includes, but is not limited to: conditional statements, cyclic functions, list cutting techniques, etc.;
specifically, in the present embodiment, the number of digits and the abnormal number are determined using the if statement of Python and the for loop.
S500, an exception handling step:
in this step, the numbers which do not meet the result of the prize drawing in the above-mentioned test result are recorded, recorded as abnormal numbers, and corresponding error prompt or warning information is output, and the specific implementation code is as shown in fig. 5;
specifically, in this embodiment, the target numbers that do not meet the result of the prize drawing are stored in a list; returning the list to the front end code, or outputting a corresponding error message to a console or a log file so as to facilitate error reminding;
s600, outputting a result:
in this step, corresponding report output is performed for the test result of the target data, and the specific implementation effect is shown in fig. 6;
specifically, in this embodiment, a report or a web page is used to display the test result;
specifically, in the present embodiment, the content of the output display includes, but is not limited to: the lottery drawing date, the lottery, the sales amount, the corresponding target number, the corresponding lottery drawing result number, the lottery drawing correctness or mistakes and specific lottery drawing mistakes information;
specifically, in this embodiment, specific prize-drawing error cause information includes: a number list with inconsistent number length, failed red ball verification or failed blue ball verification;
specifically, in this embodiment, the result is displayed in real time by adopting the python flash technology + vue front-end code;
in conclusion, based on the method, the automatic inspection of the multi-color lottery numbers is realized, and the method has higher convenience, accuracy and inspection efficiency.
Example 2
The present embodiment provides a multi-type number format checking system, as shown in fig. 7, based on the same inventive concept as that of the multi-type number format checking method described in embodiment 1, including: the system comprises a data acquisition module, a data analysis module, a specification definition module, a format verification module, an exception processing module and a result output module;
the data acquisition module is used for acquiring the number data to be verified;
in the system, the obtaining the number data to be verified includes: the data acquisition module acquires the number data to be verified from a website based on a crawler technology and an HTTP request; and the data acquisition module stores the returned number data to be verified as a text file or performs database recording.
The data analysis module is used for analyzing the number data to be verified and extracting target data in the number data to be verified;
in the system, the analyzing the number data to be verified, extracting target data in the number data to be verified, includes: the data analysis module extracts a target part in the number data to be verified based on a data extraction technology; and the data analysis module performs data structure conversion on the target part to obtain the target data.
The specification definition module is used for configuring a multi-type number verification specification;
in the present system, the configuring the multi-type number verification specification includes: the specification definition module sets a number format specification and a check specification which correspond to a plurality of data types respectively; the specification definition module takes the number format specification and the inspection specification as the multi-type number verification specification.
The format verification module is used for identifying the data type of the target data; the format verification module confirms the reference data of the target data; the format verification module configures a verification algorithm based on the multi-type number verification specification; the format verification module invokes the verification algorithm to perform format verification on the target data according to the data type and the reference data;
in the system, the invoking the inspection algorithm, performing a format inspection on the target data according to the data type and the reference data, includes: the format verification module invokes the verification algorithm, and compares the number of the target data with the number of the reference data one by one according to the number format specification and the verification specification corresponding to the data type of the target data; the format verification module responds to the fact that each number of the target data after comparison meets the corresponding verification specification, and judges that the target data passes the verification; and the format verification module responds to the fact that the number which does not meet the corresponding verification specification exists in the target data after comparison, and judges that the target data is not verified.
The abnormal processing module is used for prompting an abnormal result according to the checking result of the format check;
in the system, the abnormal result prompting according to the checking result of the format check comprises: the exception handling module creates an exception data list; the abnormality processing module judges that the target data which fails to pass the inspection is abnormal data; the exception handling module stores the exception data into the exception data list; and the exception processing module returns the exception data list to the front end for prompting.
The result output module is used for outputting a test report according to the test result of the format test;
in the present system, the inspection report includes: error cause information that the abnormal data fails to be checked.
Example 3
The present embodiment provides a computer-readable storage medium including:
the storage medium is used for storing computer software instructions for implementing the multi-type number format checking method described in the above embodiment 1, and includes a program for executing the above-described program set for the multi-type number format checking method; specifically, the executable program may be built in the multi-type number format checking system described in embodiment 2, so that the multi-type number format checking system can implement the multi-type number format checking method described in embodiment 1 by executing the built-in executable program.
Further, the computer readable storage medium provided in the present embodiment may be any combination of one or more readable storage media, where the readable storage media includes an electric, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof.
Example 4
The present embodiment provides an electronic device, as shown in fig. 8, which may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
a processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the multi-type number format checking method described in the above embodiment 1.
As an embodiment of the present invention, the communication bus mentioned by the above-mentioned terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 8, but not only one bus or one type of bus.
As an embodiment of the present invention, a communication interface is used for communication between the terminal and other devices.
As an embodiment of the present invention, the memory may include a random access memory (Random Ac cess Memory, abbreviated as RAM) or may include a non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an embodiment of the present invention, the above-mentioned processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
Compared with the prior art, the method, the system, the equipment and the medium for checking the multi-type number format can be used for checking the lottery-drawing number formats of different color types rapidly and accurately through an automatic script mode, and the automatic processing mode can be used for effectively processing a large amount of data, so that the method has higher accuracy, avoids errors caused by manual intervention, improves timeliness and saves labor and time cost; the method supports expansion and flexible configuration, can rapidly cope with new color types or new lottery rules, has stronger adaptability and applicability, supports abnormal number recording, facilitates subsequent data analysis and statistics, overcomes the defects of the prior art, and improves the application value.
It should be understood that, in the various embodiments herein, the sequence number of each process described above does not mean the sequence of execution, and the execution sequence of each process should be determined by its functions and internal logic, and should not constitute any limitation on the implementation process of the embodiments herein.
It should also be understood that in embodiments herein, the term "and/or" is merely one relationship that describes an associated object, meaning that three relationships may exist. For example, a and/or B may represent: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided herein, it should be understood that the disclosed systems, devices, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. In addition, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices, or elements, or may be an electrical, mechanical, or other form of connection.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the elements may be selected according to actual needs to achieve the objectives of the embodiments herein.
In addition, each functional unit in the embodiments herein may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions herein are essentially or portions contributing to the prior art, or all or portions of the technical solutions may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments herein. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only illustrative of the present invention and is not intended to limit the scope of the invention, and all equivalent structures or equivalent processes or direct or indirect application in other related technical fields are included in the scope of the present invention.

Claims (10)

1. A method for testing a multi-type number format, comprising the steps of:
a data acquisition step:
obtaining number data to be verified;
and a data analysis step:
analyzing the number data to be verified, and extracting target data in the number data to be verified;
the specification definition step:
configuring a multi-type number verification specification;
and a format verification step:
identifying a data type of the target data;
confirming reference data of the target data;
configuring a checking algorithm based on the multi-type number verification specification;
invoking the checking algorithm, and performing format checking on the target data according to the data type and the reference data;
an exception handling step:
carrying out abnormal result prompt according to the checking result of the format check;
and outputting a result:
outputting a test report according to the test result of the format test.
2. A method of checking a multi-type number format according to claim 1, wherein:
the obtaining the number data to be verified comprises the following steps:
acquiring the number data to be verified from a website based on a crawler technology and an HTTP request;
and storing the returned number data to be verified as a text file or carrying out database record.
3. A method of checking a multi-type number format according to claim 1, wherein:
the analyzing the number data to be verified, extracting target data in the number data to be verified, comprises the following steps:
extracting a target part in the number data to be verified based on a data extraction technology;
and carrying out data structure conversion on the target part to obtain the target data.
4. A method of checking a multi-type number format according to claim 1, wherein:
the configuring the multi-type number verification specification includes:
setting a number format specification and a check specification which correspond to a plurality of data types respectively;
the number format specification and the verification specification are used as the multi-type number verification specification.
5. The method for checking a multi-type number format according to claim 4, wherein:
the invoking the verification algorithm, performing format verification on the target data according to the data type and the reference data, includes:
invoking the checking algorithm, and comparing the number of the target data with the number of the reference data one by one according to the number format specification and the checking specification corresponding to the data type of the target data;
responding to each number of the target data after comparison to meet the corresponding inspection standard, and judging that the target data is inspected to pass;
and judging that the target data is not passed in response to the fact that the number which does not meet the corresponding test specification exists in the target data after comparison.
6. The method for checking a multi-type number format according to claim 5, wherein:
and the abnormal result prompt is carried out according to the test result of the format test, and comprises the following steps:
creating an abnormal data list;
judging that the target data which fails the inspection is abnormal data;
storing the abnormal data into the abnormal data list;
and returning the abnormal data list to the front end for prompting.
7. The method for checking a multi-type number format according to claim 6, wherein:
the inspection report includes: error cause information that the abnormal data fails to be checked.
8. A multi-type number format verification system, comprising: the system comprises a data acquisition module, a data analysis module, a specification definition module, a format verification module, an exception processing module and a result output module;
the data acquisition module is used for acquiring the number data to be verified;
the data analysis module is used for analyzing the number data to be verified and extracting target data in the number data to be verified;
the specification definition module is used for configuring a multi-type number verification specification;
the format verification module is used for identifying the data type of the target data; the format verification module confirms the reference data of the target data; the format verification module configures a verification algorithm based on the multi-type number verification specification; the format verification module invokes the verification algorithm to perform format verification on the target data according to the data type and the reference data;
the abnormal processing module is used for prompting an abnormal result according to the checking result of the format check;
and the result output module is used for outputting a test report according to the test result of the format test.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the multi-type number format verification method of any one of claims 1 to 7.
10. A computer device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface, the memory complete communication with each other through the communication bus; wherein:
the memory is used for storing a computer program;
the processor is configured to execute the steps of the multi-type number format checking method according to any one of claims 1 to 7 by running a program stored on the memory.
CN202311643585.4A 2023-12-04 2023-12-04 Method, system, equipment and medium for checking multi-type number format Pending CN117556306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311643585.4A CN117556306A (en) 2023-12-04 2023-12-04 Method, system, equipment and medium for checking multi-type number format

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311643585.4A CN117556306A (en) 2023-12-04 2023-12-04 Method, system, equipment and medium for checking multi-type number format

Publications (1)

Publication Number Publication Date
CN117556306A true CN117556306A (en) 2024-02-13

Family

ID=89812590

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311643585.4A Pending CN117556306A (en) 2023-12-04 2023-12-04 Method, system, equipment and medium for checking multi-type number format

Country Status (1)

Country Link
CN (1) CN117556306A (en)

Similar Documents

Publication Publication Date Title
US8527441B2 (en) Developing fault model from service procedures
US8286140B2 (en) System, computer program, and method for a static code coverage analyzer for computer programs
CN110688300A (en) Compatibility testing method, device, equipment and storage medium
CN110704304A (en) Application program testing method and device, storage medium and server
CN109271315B (en) Script code detection method, script code detection device, computer equipment and storage medium
CN110955590A (en) Interface detection method, image processing method, device, electronic equipment and storage medium
CN110427375B (en) Method and device for identifying field type
CN113312260B (en) Interface test method, device, equipment and storage medium
CN110910081A (en) Workflow configuration implementation method and system based on laboratory information management system
CN112052172A (en) Rapid testing method and device for third-party channel and electronic equipment
CN114048129A (en) Automatic testing method, device, equipment and system for software function change
CN109460661A (en) A kind of logical security leak detection method, device and terminal device
CN117556306A (en) Method, system, equipment and medium for checking multi-type number format
CN112686019A (en) Vehicle sensor data analysis method, device and storage medium
CN110968518A (en) Analysis method and device for automatic test log file
CN116431522A (en) Automatic test method and system for low-code object storage gateway
CN116662186A (en) Log playback assertion method and device based on logistic regression and electronic equipment
CN116738091A (en) Page monitoring method and device, electronic equipment and storage medium
CN115422865A (en) Simulation method and device, computing equipment and computer readable storage medium
CN112580334A (en) File processing method, file processing device, server and storage medium
CN101427253B (en) System and method for the automatic verification of planning results
CN117171547B (en) Fault diagnosis method, device, equipment and storage medium based on large model
US11797409B1 (en) Method and system for managing transactions burstiness and generating signature thereof in a test environment
CN116795684A (en) Automatic test method, device, terminal equipment and medium of interface
CN118295899A (en) Automatic test method, system, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination