CN107403112A - Data verification method and its equipment - Google Patents

Data verification method and its equipment Download PDF

Info

Publication number
CN107403112A
CN107403112A CN201710644918.3A CN201710644918A CN107403112A CN 107403112 A CN107403112 A CN 107403112A CN 201710644918 A CN201710644918 A CN 201710644918A CN 107403112 A CN107403112 A CN 107403112A
Authority
CN
China
Prior art keywords
data
instance
key
received
value pair
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.)
Granted
Application number
CN201710644918.3A
Other languages
Chinese (zh)
Other versions
CN107403112B (en
Inventor
朱德伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201710644918.3A priority Critical patent/CN107403112B/en
Publication of CN107403112A publication Critical patent/CN107403112A/en
Application granted granted Critical
Publication of CN107403112B publication Critical patent/CN107403112B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Bioethics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

Present disclose provides a kind of data verification method.Data verification method includes:Application interface request is received from application, the application interface request includes suction parameter;The application interface received to corresponding micro services transparent transmission is asked;Instance data is received from corresponding micro services;And the instance data received is verified based on the suction parameter.The embodiment of the present disclosure additionally provides corresponding data check equipment.

Description

Data verification method and its equipment
Technical field
This disclosure relates to data processing field, and in particular to a kind of data verification method and its equipment.
Background technology
With developing rapidly for mobile Internet, Mobile solution (app) is also more and more applied.Mobile app mono- As by interface requests access server, to obtain related data.Prior art provides a kind of data returned to server The mode verified.The Jsonschema that the program is fixed by one or more verifies file to verify total interface number According to integrality.Each server end returned data or app are verified before taking data, each interface corresponding at least one Individual Jsonschema files.Therefore the program needs to safeguard many complicated JsonSchema files, safeguards cumbersome and multiple It is miscellaneous.
Therefore, it is necessary to which a kind of scheme verified to data, difficult in maintenance in the prior art to avoid at least in part The problem of.
The content of the invention
In view of this, present disclose provides a kind of data verification method, data check equipment and corresponding computer-readable Storage medium.
An aspect of this disclosure provides a kind of method for data check.This method includes receiving application from application Interface requests, the application interface request include suction parameter;The application interface received to corresponding micro services transparent transmission Request;Instance data is received from corresponding micro services;And based on the suction parameter come to the instance data received progress Verification.
According to some embodiments of the present disclosure, the instance data received includes the data of multiple levels, the multiple layer The data of level have corresponding key-value pair in each level.In this case, based on suction parameter come to the instance data received Carrying out verification may include:Obtain key-value pair of the data in each level of multiple levels;And by acquired key-value pair and at it The key-value pair of the preceding one or more instance datas for obtaining and caching successively is compared, to enter to the instance data received Row verification.Wherein, should the one or more instance datas for obtaining and caching before key-value pair also in it is described enter The application interface request of mouth parameter.
According to some embodiments of the present disclosure, by acquired key-value pair and in the one or more for obtaining and caching before The key-value pair of instance data is successively compared may include with carrying out verification to the instance data received:If receive The key assignments of its key-value pair and the one or more instance datas for obtaining and caching before in multiple levels in instance data be present To different levels, the instance data received is stored, for the verification of subsequently received instance data.
According to some embodiments of the present disclosure, by acquired key-value pair and in the one or more for obtaining and caching before The key-value pair of instance data is successively compared may include with carrying out verification to the instance data received:If with obtaining before The one or more instance datas for taking and caching are compared, and the instance data received lacks one or more key-value pairs, Huo Zheru The instance data that fruit receives does not receive within a predetermined period of time, it is determined that there occurs data for the instance data received It is abnormal.
According to some embodiments of the present disclosure, this method may also include data reporting exception, the place in a manner of by intervention Manage the data exception.This method, which may also include, caches the instance data that its data exception is handled, for receipt of subsequent The verification of the instance data arrived.
According to some embodiments of the present disclosure, processing data may include extremely by way of intervention:Abandon that there occurs number According to the instance data of exception;Or using there occurs the instance data of data exception as normal data, for subsequently received Instance data verification.
Another aspect of the disclosure provides a kind of equipment for data check.The equipment includes first and receives list Member, the first transmitting element, the second receiving unit and verification unit.First receiving unit is used for please from application reception application interface Ask, the application interface request includes suction parameter.First transmitting element is used to receive to corresponding micro services transparent transmission Application interface request.Second receiving unit is used to receive instance data from corresponding micro services.Verification unit is used to be based on institute Suction parameter is stated to be verified to the instance data received.
According to some embodiments of the present disclosure, the instance data received includes the data of multiple levels, the multiple layer The data of level have corresponding key-value pair in each level.In the case, verification unit can be additionally used in:Obtain the multiple level Data each level key-value pair;And by acquired key-value pair and in the one or more examples for obtaining and caching before The key-value pair of data is successively compared, to be verified to the instance data received, wherein, it is described to be obtained before The key-value pair for the one or more instance datas for taking and caching is directed to the application interface request with the suction parameter.
According to some embodiments of the present disclosure, verification unit can be additionally used in:It is determined that in the instance data received It is different from the key-value pair of the one or more instance datas for obtaining and caching before to there is its key-value pair in multiple levels Level.Equipment may also include buffer unit, and the buffer unit is used to store the instance data received, for rear continued access The verification of the instance data received.
According to some embodiments of the present disclosure, verification unit can be additionally used in:If with obtain and cache before one or Multiple instance datas are compared, and the instance data received lacks one or more key-value pairs, or if described receive Instance data do not receive within a predetermined period of time, it is determined that the instance data that receives is different there occurs data Often.
According to some embodiments of the present disclosure, the equipment may also include abnormal conditions processing unit.Abnormal conditions processing is single Member is used for data reporting exception, and the data exception is handled in a manner of by intervention.In the case, buffer unit also can use In caching the instance data that is handled of its data exception, for the verification of subsequently received instance data.
According to some embodiments of the present disclosure, the data exception is handled by way of intervention may include:Abandon occurring The instance data of data exception;Or using there occurs the instance data of data exception as normal data, for rear continued access The verification of the instance data received.
Another aspect of the present disclosure provides a kind of equipment for processing data.The equipment, which includes storage computer, to be held The memory and processor of row instruction.The computer executable instructions of computing device memory storage, to perform as above institute The method stated.
Another aspect of the present disclosure provides a kind of computer-readable recording medium, is stored with computer executable instructions, The instruction is used to realize method as described above when executed.
Another aspect of the present disclosure provides a kind of computer program, and the computer program includes the executable finger of computer Order, the instruction are used to realize method as described above when executed.
Such scheme is avoided in the prior art due to needing at least in part by carrying out data check for suction parameter File is verified to verify caused by the integrality of total interface data by the Jsonschema of one or more fixation The problem of difficult in maintenance.
Brief description of the drawings
By the detailed description carried out below in conjunction with the accompanying drawings to the embodiment of the present disclosure, the features described above of the disclosure and excellent will be made Point is more obvious, wherein:
Fig. 1 shows a kind of outline flowchart of data verification method according to the embodiment of the present disclosure;
Fig. 2 shows the brief block diagram of the data check equipment according to the embodiment of the present disclosure;
Fig. 3 shows the schematic diagram of the equipment connecting relation according to the embodiment of the present disclosure;
Fig. 4 shows the example flow of the specific implementation of the data check according to the embodiment of the present disclosure;
Fig. 5 shows the block diagram arranged according to the exemplary hardware of the data processing equipment of the embodiment of the present disclosure;And
Fig. 6 diagrammatically illustrates the example system that can apply the method according to Fig. 1 according to the embodiment of the present disclosure Framework 600.
Embodiment
Hereinafter, it will be described with reference to the accompanying drawings embodiment of the disclosure.However, it should be understood that these descriptions are simply exemplary , and it is not intended to limit the scope of the present disclosure.In addition, in the following description, the description to known features and technology is eliminated, with Avoid unnecessarily obscuring the concept of the disclosure.
Term as used herein is not intended to limit the disclosure just for the sake of description specific embodiment.Used here as Word " one ", " one (kind) " and "the" etc. should also include " multiple ", the meaning of " a variety of ", unless context clearly refers in addition Go out.In addition, term " comprising " as used herein, "comprising" etc. indicate the presence of the feature, operation, operation and/or part, But it is not excluded that in the presence of or other one or more features of addition, operation, operation or parts.
All terms (including technology and scientific terminology) as used herein have what those skilled in the art were generally understood Implication, unless otherwise defined.It should be noted that term used herein should be interpreted that with consistent with the context of this specification Implication, without should by idealization or it is excessively mechanical in a manner of explain.
Shown in the drawings of some block diagrams and/or flow chart.It should be understood that some sides in block diagram and/or flow chart Frame or its combination can be realized by computer program instructions.These computer program instructions can be supplied to all-purpose computer, The processor of special-purpose computer or other programmable data processing units, so as to which these instructions can be with when by the computing device Create the device for realizing function/operation illustrated in these block diagrams and/or flow chart.
Therefore, the technology of the disclosure can be realized in the form of hardware and/or software (including firmware, microcode etc.).Separately Outside, the technology of the disclosure can take the form of the computer program product on the computer-readable medium for being stored with instruction, should Computer program product is available for instruction execution system use or combined command execution system to use.In the context of the disclosure In, computer-readable medium can be the arbitrary medium that can include, store, transmit, propagate or transmit instruction.For example, calculate Machine computer-readable recording medium can include but is not limited to electricity, magnetic, optical, electromagnetic, infrared or semiconductor system, device, device or propagation medium. The specific example of computer-readable medium includes:Magnetic memory apparatus, such as tape or hard disk (HDD);Light storage device, such as CD (CD-ROM);Memory, such as random access memory (RAM) or flash memory;And/or wire/wireless communication link.
Fig. 1 shows a kind of outline flowchart of data verification method according to the embodiment of the present disclosure.
As shown in figure 1, this method includes operation S110, application interface request is received from application, application interface request includes Suction parameter;
S120 is operated, the application interface received to corresponding micro services transparent transmission is asked;
S130 is operated, instance data is received from corresponding micro services;And
S140 is operated, the instance data received is verified based on suction parameter.
In some instances, the instance data received may include the data of multiple levels, and the data of the plurality of level exist Each level has corresponding key-value pair.In this case, verification bag is carried out to the instance data received based on suction parameter Include:Obtain key-value pair of the data in each level of multiple levels;And by acquired key-value pair with obtaining and caching before The key-value pairs of one or more instance datas be successively compared, to be verified to the instance data received, wherein, The application interface with above-mentioned suction parameter is directed in the key-value pair for the one or more instance datas for obtaining and caching before Request.
In some instances, by acquired key-value pair and in the one or more instance datas for obtaining and caching before Key-value pair is successively compared may include with carrying out verification to the instance data received:If in the instance data received Multiple levels in the different layers of key-value pair of one or more instance datas of its key-value pair from obtaining and caching before be present Level, stores the instance data received, for the verification of subsequently received instance data.
In some instances, by acquired key-value pair and in the one or more instance datas for obtaining and caching before Key-value pair is successively compared may include with carrying out verification to the instance data received:If with obtaining and caching before One or more instance datas are compared, the instance data received lacks one or more key-value pairs, or if are received Instance data does not receive within a predetermined period of time, it is determined that there occurs data exception for the instance data received.
In some instances, this method may also include data reporting exception, and processing data is abnormal in a manner of by intervention. This method, which may also include, caches the instance data that its data exception is handled, for the school of subsequently received instance data Test.
Intervention as described herein may include the manual intervention that user is carried out after alarm (such as short message) is received, can also Including system after alarm is received, according to the automatic intervention of pre-defined processing rule progress, the embodiment of the present disclosure is not Specific implementation by specific intervening measure is limited.For example, user can be notified by way of short message, handled by user Abnormal conditions.User mentioned here can be the developer of the equipment or system described in the disclosure, attendant or have Any other personnel of abnormal conditions processing authority/parameter modification authority, the disclosure are limited not to this.
In some instances, processing data may include extremely by way of intervention:Abandon the reality there occurs data exception Number of cases evidence;Or using there occurs the instance data of data exception as normal data, for subsequently received instance data Verification.
Fig. 2 shows the simplified block diagram of the data check equipment corresponding with the method shown in Fig. 1.As shown in Fig. 2 this sets It is standby to include the first receiving unit 210, the first transmitting element 220, the second receiving unit 230 and verification unit 240.First receives list Member 210 is used to receive application interface request from application, and application interface request includes suction parameter.First transmitting element 220 is used for The application interface received to corresponding micro services transparent transmission is asked.Second receiving unit 230 is used for from corresponding micro services Receive instance data.Verification unit 240 is used to verify the instance data received based on suction parameter.
In some instances, the instance data received includes the data of multiple levels, and the data of multiple levels are in each layer Level has corresponding key-value pair.In the case, verification unit 240 can be additionally used in:The data of multiple levels are obtained in each level Key-value pair;And by acquired key-value pair with the one or more instance datas for obtaining and caching before key-value pair by Level is compared, to be verified to the instance data received, wherein, it is real in the one or more for obtaining and caching before The key-value pair of number of cases evidence is directed to the application interface request with above-mentioned suction parameter.
In some instances, verification unit 240 can be additionally used in:It is determined that deposited in multiple levels in the instance data received In the different level of the key-value pair for one or more instance datas that its key-value pair obtains from before and caches.
Equipment may also include buffer unit 250, and the buffer unit 250 is used to store the instance data received, for The verification of subsequently received instance data.
In some instances, verification unit 240 can be additionally used in:If with the one or more examples for obtaining and caching before Data are compared, and the instance data received lacks one or more key-value pairs, or if the instance data received be not Received in predetermined amount of time, it is determined that there occurs data exception for the instance data received.
In some instances, the equipment may also include abnormal conditions processing unit 260.Abnormal conditions processing unit 260 is used Abnormal in data reporting, processing data is abnormal in a manner of by intervention.In the case, buffer unit 260 can also be used for delaying The instance data that its data exception is handled is deposited, for the verification of subsequently received instance data.
In some instances, the data exception is handled by way of intervention may include:Abandon that there occurs data exception Instance data;Or using there occurs the instance data of data exception as normal data, for subsequently received example The verification of data.
In some instances, the equipment may also include the second transmitting element 270, for returning through the reality of verification to application Number of cases evidence.Specifically, the instance data by verification can be the instance number after the processing of abnormal conditions processing unit 260 According to.
Although it should be noted that in figure 3 the transmitting element 220 of the first receiving unit 210/ first is shown as being connected to Buffer unit 250, to represent the data storage/caching that the transmitting element 220 of the first receiving unit 210/ first can be received/sent In buffer unit 250, but the data that the first receiving unit 210 receives can also be direct via the first transmitting element 220 Send, the disclosure is limited not to this.
Below, the technical scheme of the disclosure will be described in more detail with reference to figure 3 and Fig. 4.Fig. 3 shows real according to the disclosure Apply the schematic diagram of the equipment connecting relation of example.API will be shown as according to the equipment for data check of the disclosure in figure 3 (application interface) gateway, but any other title can also be used, as long as it can realize equipment described in the embodiment of the present disclosure Function.
With the fast development of Internet service, Large-Scale Interconnected net company includes numerous business platforms, and for convenience User, which uses, can all issue the app of oneself.If each application there are the API outlets of oneself, it is very multiple to safeguard that modification can involve Miscellaneous dependency logic.Quick service duplication and business management and control are carried out on multiple platforms for convenience, and the embodiment of the present disclosure is drawn The equipment for handling these service duplications and business management and control is entered.In some embodiments of the present disclosure, such equipment can It is used as the API gateway shown in gateway, such as Fig. 3.In the case, in addition to function described in Fig. 2, API gateway also may be used With gateway generally with flow control, safety, audit, the function such as monitoring, will not be repeated here.It is of course also possible to use it can locate Other any equipment of service duplication and business management and control are managed, and are not limited to API gateway.Specifically, an application interface request (example As app is asked) multiple soa (micro services) can be transmitted transparently to by such as API gateway.
The request of all application interfaces can be transmitted transparently to corresponding soa (in incognito by the gateway equivalent to interface transparent transmission platform Business).In actual applications, each micro services can generally be safeguarded by a team.The embodiment of the present disclosure is led in such as API gateway Cross for suction parameter to carry out data check, avoid at least in part in the prior art due to needing to pass through one or more The problem of fixed Jsonschema verification files are to verify difficult in maintenance caused by the integrality of total interface data.
In some embodiments of the present disclosure, data check can be carried out by way of data training.
Fig. 4 shows the exemplary flow of a specific implementation of the method for data check according to the embodiment of the present disclosure Journey.As shown in figure 4, the concrete mode of the specific implementation is as follows:
Operation 410.API gateways receive the API request from app, and the API includes suction parameter, the knot of suction parameter Structure can be key assignments (key&value) one-to-one mode.Such as x1=22, x2=4555 etc.;
Operation 420.API gateways by the API request received transparent (that is, without processing) be transferred to corresponding to micro- soa, connect Receive the instance data of the json structures of correspondence soa returns;
Key (key) is stored as asking entrance by operation 430.API gateways for example, by buffer (such as buffer redis) Parameter, it can be recorded as (x1, x2), value (value) is the json structured datas returned.Such as the example of json structured datas can It is as follows:
In for example above-mentioned json structured datas, code represents command code, and it is correct or wrong that success represents returned data By mistake, data is specific returned data.The data are combined by multiple hierarchical datas.It should be noted that although above-mentioned show Data has two levels, but embodiment of the present disclosure not limited to this in example, can also apply the data with more or less levels. Although in addition, described using x1 and x2 as the example of suction parameter, in concrete implementation, it is also possible to exist more or more Few suction parameter.
In general, all json data can be multi-layer key-value pair (key&value) structure.It can predefine The period of one normal operation is used as uptime section.In the disclosed embodiments, can give tacit consent in normal operation Between the data that are obtained during section be normal data, and available for being contrasted with the data obtained afterwards to enter line number According to verification.The uptime section can be chosen as needed.For example, it may be selected all to test in server end and app ends logical Later a hour, but not limited to this or other periods, such as 1 day, 2 days, 1 week etc..In the disclosure In some embodiments, the selection of period can be continuous, but in further embodiments, the selection of period can also It is random, with (for example, certain daily time etc.) be specifically spaced, with specific features or using this area skill Art personnel it is conventional or can thinkable other times section choose mode, will not be repeated here.
Obtained during uptime section and cache the json structured datas of the return of the first time in this period As partial data, it is assumed that be data1, when receiving the interface requests with identical suction parameter next time, cache this time The json structured datas of return, by being compared to the json returned twice structured datas to carry out data check.The side of comparison One example of method is as described below:
As above-mentioned code can be seen that the json structured datas for specific suction parameter returned from soa obtained May include code, success, data, wherein it is possible to intervene code and data with make it equal to value that may be present (for example, its Value in value set).But data has many possible values, such as the various possible values of the json objects of each level Various combination, it is carried out (such as artificial) intervene be undoubtedly it is complicated and time-consuming.The embodiment of the present disclosure can be obtained by basis To the normal operation phase data constantly intervene+automatic anticipation obtains more partial datas, using as next time The normal data of verification., it is necessary to be verified respectively for the data of each level in data in checking procedure.Upper one Start the verification of next hierarchical data after the data check success of level, and when the data check of last layer level is unsuccessful Judge this verification data and the data of above-mentioned verification be data different values, it is not necessary to carry out next hierarchical data again Verification.
When to being verified in each data after obtaining data1, such as first in data can be obtained first Each key-value pair of the data of level (being " next level " for above-mentioned structured data), and whether verify is empty (null)., can be then by upper level key-value pair (for example, data1) once taken and this for not being empty key-value pair Secondary level key-value pair taken contrasts.If comparing result shows that the key-value pair taken twice is different, and data acquisition Period is up the period, then can store these be null value key assignments for data check next time, and Terminate this data check.
If comparing result shows that the key-value pair taken twice is identical, show the data check of this level in data into Work(.Attempt to obtain the data of next level and verified.Then terminate this verification if there is no next hierarchical data, Then continue the operation of above-mentioned verification if there is next hierarchical data, by data and last partial data same level Key, value are compared, and the rest may be inferred, until level all in data all compares completion or occurred until in a certain level Different key-value pairs.
If there is field missing (such as instance data lacks some or some key-value pairs compared with instance data before) And/or data obtaining time then shows that instance data occurs not in (such as developer) predefined uptime section Data exception situation.If there is no field missing and data obtaining time in the predefined uptime section (i.e., Instance data is normal), and instance data and data1 are different, then the instance data of this verification are cached, using as next time One foundation of contrast.The result (instance data of caching) can be assumed to be data2.
Multiple comparative result data3, data4... are likely present in uptime section.In certain embodiments, In comparison each time, it is required for being contrasted with all comparative results cached before.Such as when verifying data3, need Compared with all key-value pair successively being carried out with both data1 and data2.
For different scenes, whether data can normally have different definition.Such as in some embodiments of the present disclosure In, there can be newly-increased situation to be considered data normal condition the key assignments in multi-level structure, and in further embodiments, The situation can be considered to data exception situation.The limit that the embodiment of the present disclosure is not specifically defined by the whether normal difference of data System.
Operation 440. during next uptime section, gateway may also be received from each app with it is identical enter The interface requests of mouth parameter, i.e. the suction parameter or x1, x2 of request.Now, all comparative results cached can be traveled through (including the knot of caching before during the result and this uptime section cached during upper uptime section Fruit, such as each data1, data2, data3, data4... obtained from buffer), with each level of instant example data Structure numerical value and key-value pair compare.It if newly-increased value, can prompt newly-increased, and instance data normally returned to App (have an impact) because newly-increased key typically will not parse json to app, if it find that instant example data lack key, then table Bright app there may be null pointer or data as sky when receiving the instance data in the case that, that is, there is instance data appearance Data exception situation, so as to the risk with display entanglement.
At this time API gateway can send alarm in a manner of sending short messages.Intervention can be passed through after alarm is received Mode solve this problem.For example, can be by abandoning this data or regarding this data as the modes such as normal data to solve The certainly problem, or those skilled in the art can be used conventional or can other thinkable any intervening measures, it is no longer superfluous herein State.It should be noted that this alarm checks data during being equally applicable to operation 430 with the mode intervened there is exception Situation.
In addition, intervention as described herein may include user (for example, developer or other staff with specified permission) The manual intervention carried out after alarm (such as short message) is received, system can also be included after alarm is received, according to pre- The automatic intervention that the processing rule first defined is carried out, the embodiment of the present disclosure are not limited by the specific implementation of specific intervening measure System.
It should be noted that for comparing result data1, data2, data3, the data4... of caching, can be directed to each Uptime section is named respectively, can also be directed to all uptime section Uniform Names, or using art technology Personnel can it is contemplated that or the other modes name that uses, the embodiment of the present disclosure do not limited by specific naming method.
Operation 450. can cache the knot that the result after intervening is used as the data check corresponding to the intervention after intervention Fruit.Then in next uptime section, can by the json data returned in the first two uptime section (data1, Data2, data3...) data that are received with the 3rd uptime section continue to compare, by that analogy.Currently, exist In some embodiments, the quantity for the uptime section to be compared can also be set, for example, only normally being transported with the first two The row period is compared, and only caches data of the first two uptime section etc., it is of course also possible to use more or more Few uptime section.It should be noted that only needed during second uptime section with first just The data of caching are contrasted in normal run time section.
Above-described embodiment is data cached during a uptime section and obtains cached data to carry out school Test, but in further embodiments, can also be only data cached during a uptime section, and in the period Cached data are extracted from such as buffer (such as redis buffers) afterwards to concentrate carry out data check, or are being cached Any other moment after data extracts cached data to carry out data check.
Above-described embodiment trains verification standard by defining a normal operation phase to obtain correct interface json data Data, then in actual motion, compared with the data newly obtained are done into level and key assignments with training verification normal data, if hair Now lack key assignments and then send alarm, abandon this data or as normal data by intervening, if increasing key assignments newly, then It can be increased newly as normal data automatically.Efficient json structured datas are realized by this mode to verify.
Fig. 5 diagrammatically illustrates the block diagram of the equipment for file transmission in accordance with an embodiment of the present disclosure, and it corresponds to Equipment shown in Fig. 2.Equipment shown in Fig. 5 is only an example, should not be to the function and use range of the embodiment of the present disclosure Bring any restrictions.
As shown in figure 5, include CPU (CPU) 501 according to the equipment 500 of the embodiment, it can be according to depositing Store up the program in read-only storage (ROM) 502 or be loaded into from storage part 508 in random access storage device (RAM) 503 Program and perform various appropriate actions and processing.In RAM 503, also it is stored with equipment 500 and operates required various journeys Sequence and data.CPU 501, ROM 502 and RAM 503 are connected with each other by bus 504.Input/output (I/O) interface 505 It is also connected to bus 504.
Equipment 500 can also include be connected to I/O interfaces 505 with one or more in lower component:Including keyboard, mouse The importation 506 of mark etc.;Output including cathode-ray tube (CRT), liquid crystal display (LCD) etc. and loudspeaker etc. Part 507;Storage part 508 including hard disk etc.;And the NIC including LAN card, modem etc. Communications portion 509.Communications portion 509 performs communication process via the network of such as internet.Driver 510 is also according to needing to connect It is connected to I/O interfaces 505.Detachable media 511, such as disk, CD, magneto-optic disk, semiconductor memory etc., pacify as needed On driver 510, in order to which the computer program read from it is mounted into storage part 508 as needed.
Especially, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product, it includes being carried on computer-readable medium On computer program, the computer program include be used for execution flow chart shown in method program code.In such reality To apply in example, the computer program can be downloaded and installed by communications portion 509 from network, and/or from detachable media 511 are mounted.When the computer program is performed by CPU (CPU) 501, in the equipment for performing the embodiment of the present disclosure The above-mentioned function of limiting.
It should be noted that the computer-readable medium shown in the disclosure can be computer-readable signal media or meter Calculation machine readable storage medium storing program for executing either the two any combination.Computer-readable recording medium for example can be --- but not Be limited to --- electricity, magnetic, optical, electromagnetic, system, device or the device of infrared ray or semiconductor, or it is any more than combination.Meter The more specifically example of calculation machine readable storage medium storing program for executing can include but is not limited to:Electrical connection with one or more wires, just Take formula computer disk, hard disk, random access storage device (RAM), read-only storage (ROM), erasable type and may be programmed read-only storage Device (EPROM or flash memory), optical fiber, portable compact disc read-only storage (CD-ROM), light storage device, magnetic memory device, Or above-mentioned any appropriate combination.In the disclosure, computer-readable recording medium can any include or store journey The tangible medium of sequence, the program can be commanded the either device use or in connection of execution system, device.And at this In open, computer-readable signal media can be included in a base band or the data-signal as carrier wave part propagation, Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can Any computer-readable medium beyond storage medium is read, the computer-readable medium, which can send, propagates or transmit, to be used for By instruction execution system, device either device use or program in connection.Included on computer-readable medium Program code can be transmitted with any appropriate medium, be included but is not limited to:Wirelessly, electric wire, optical cable, RF etc., or it is above-mentioned Any appropriate combination.
Flow chart and block diagram in accompanying drawing, it is illustrated that according to the system of the various embodiments of the disclosure, method and computer journey Architectural framework in the cards, function and the operation of sequence product.At this point, each square frame in flow chart or block diagram can generation The part of one module of table, program segment or code, a part for above-mentioned module, program segment or code include one or more For realizing the executable instruction of defined logic function.It should also be noted that some as replace realization in, institute in square frame The function of mark can also be with different from the order marked in accompanying drawing generation.For example, two square frames succeedingly represented are actual On can perform substantially in parallel, they can also be performed in the opposite order sometimes, and this is depending on involved function.Also It is noted that the combination of each square frame and block diagram in block diagram or flow chart or the square frame in flow chart, can use and perform rule Fixed function or the special hardware based system of operation are realized, or can use the group of specialized hardware and computer instruction Close to realize.
As on the other hand, the disclosure additionally provides a kind of computer-readable medium, and the computer-readable medium can be Included in equipment described in above-described embodiment;Can also be individualism, and without be incorporated the equipment in.Above-mentioned calculating Machine computer-readable recording medium carries one or more program, when said one or multiple programs are performed by the equipment, makes Obtain the equipment and perform method shown in Fig. 1.
Fig. 6 diagrammatically illustrates the example system that can apply the method according to Fig. 1 according to the embodiment of the present disclosure Framework 600.
As shown in fig. 6, terminal device 601,602,603, network can be included according to the system architecture 600 of the embodiment 604 and server 605.Network 604 is to the offer communication link between terminal device 601,602,603 and server 605 Medium.Network 604 can include various connection types, such as wired, wireless communication link or fiber optic cables etc..
User can be interacted with using terminal equipment 601,602,603 by network 604 with server 605, to receive or send out Send message etc..Various telecommunication customer end applications, such as the application of shopping class, net can be installed on terminal device 601,602,603 (merely illustrative) such as the application of page browsing device, searching class application, JICQ, mailbox client, social platform softwares.
Terminal device 601,602,603 can be that the various electronics with display screen and with data-handling capacity are set It is standby, including but not limited to smart mobile phone, tablet personal computer, pocket computer on knee and desktop computer etc..Terminal device 601st, 602,603 can also be the equipment that specific business is performed in the embodiment of the present disclosure expression.
Server 605 can be to provide the server of various services, such as can be as described in the embodiment of the present disclosure API gateway.The method shown in Fig. 1 that the embodiment of the present disclosure is provided can perform on server 605.
It should be understood that the number of the terminal device, network and server in Fig. 6 is only schematical.According to realizing need Will, can have any number of terminal device, network and server.
Embodiment of the disclosure is described above.But the purpose that these embodiments are merely to illustrate that, and It is not intended to limit the scope of the present disclosure.Although respectively describing each embodiment more than, but it is not intended that each reality Use can not be advantageously combined by applying the measure in example.The scope of the present disclosure is defined by the appended claims and the equivalents thereof.Do not take off From the scope of the present disclosure, those skilled in the art can make a variety of alternatives and modifications, and these alternatives and modifications should all fall at this Within scope of disclosure.

Claims (14)

1. a kind of method for data check, including:
Application interface request is received from application, the application interface request includes suction parameter;
The application interface received to corresponding micro services transparent transmission is asked;
Instance data is received from corresponding micro services;And
The instance data received is verified based on the suction parameter.
2. according to the method for claim 1, wherein, the instance data received includes the data of multiple levels, institute State the data of multiple levels has a corresponding key-value pair in each level, it is described based on the suction parameter come to the example received Data, which carry out verification, to be included:
Obtain key-value pair of the data in each level of the multiple level;And
Acquired key-value pair and the key-value pair in the one or more instance datas for obtaining and caching before are successively carried out Compare, to be verified to the instance data received, wherein, it is described real in the one or more for obtaining and caching before The key-value pair of number of cases evidence is directed to the application interface request with the suction parameter.
3. according to the method for claim 2, wherein, by acquired key-value pair with obtain before and cache one or The key-value pair of multiple instance datas is successively compared to be included with carrying out verification to the instance data received:
If exist in multiple levels in the instance data received its key-value pair with it is described before obtain and cache The different level of the key-value pairs of one or more instance datas, the instance data received described in storage, for receipt of subsequent The verification of the instance data arrived.
4. according to the method for claim 2, wherein, by acquired key-value pair with obtain before and cache one or The key-value pair of multiple instance datas is successively compared to be included with carrying out verification to the instance data received:
If compared with the one or more instance datas for obtaining and caching before, the instance data received lacks one Or multiple key-value pairs, or if the instance data received does not receive within a predetermined period of time, it is determined that institute Stating the instance data that receives, there occurs data exception.
5. the method according to claim 11, in addition to:
The data exception is reported, the data exception is handled in a manner of by intervention;And
The instance data that its data exception is handled is cached, for the verification of subsequently received instance data.
6. according to the method for claim 5, wherein, the data exception is handled by way of intervention to be included:
Abandon the instance data there occurs data exception;Or
Using there occurs the instance data of data exception as normal data, for the verification of subsequently received instance data.
7. a kind of equipment for data check, including:
First receiving unit, for receiving application interface request from application, the application interface request includes suction parameter;
First transmitting element, for the application interface request received to corresponding micro services transparent transmission;
Second receiving unit, for receiving instance data from corresponding micro services;And
Verification unit, for being verified based on the suction parameter to the instance data received.
8. equipment according to claim 7, wherein, the instance data received includes the data of multiple levels, institute The data for stating multiple levels have corresponding key-value pair in each level, and the verification unit is additionally operable to:
Obtain key-value pair of the data in each level of the multiple level;And
Acquired key-value pair and the key-value pair in the one or more instance datas for obtaining and caching before are successively carried out Compare, to be verified to the instance data received, wherein, it is described real in the one or more for obtaining and caching before The key-value pair of number of cases evidence is directed to the application interface request with the suction parameter.
9. equipment according to claim 8, wherein, the verification unit is additionally operable to:It is determined that the instance number received The key-value pair of its key-value pair and the one or more instance datas for obtaining and caching before in multiple levels in be present Different levels;And
The equipment also includes:Buffer unit, for storing the instance data received, for subsequently received reality The verification of number of cases evidence.
10. equipment according to claim 8, wherein, the verification unit is additionally operable to:
If compared with the one or more instance datas for obtaining and caching before, the instance data received lacks one Or multiple key-value pairs, or if the instance data received does not receive within a predetermined period of time, it is determined that institute Stating the instance data that receives, there occurs data exception.
11. equipment according to claim 10, in addition to:
Abnormal conditions processing unit, for reporting the data exception, the data exception is handled in a manner of by intervention,
Wherein, the buffer unit is additionally operable to cache the instance data that its data exception is handled, for subsequently received Instance data verification.
12. the equipment according to claim 10 or 11, wherein, the data exception is handled by way of intervention to be included:
Abandon the instance data there occurs data exception;Or
Using there occurs the instance data of data exception as normal data, for the verification of subsequently received instance data.
13. a kind of equipment for processing data, including:
Memory, store computer executable instructions;And
Processor, the computer executable instructions of the memory storage are performed, to perform according to any in claim 1 to 6 Method described in.
14. a kind of computer-readable recording medium, is stored thereon with executable instruction, the instruction makes processing when being executed by processor Device performs method according to any one of claim 1 to 6.
CN201710644918.3A 2017-07-31 2017-07-31 Data checking method and equipment thereof Active CN107403112B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710644918.3A CN107403112B (en) 2017-07-31 2017-07-31 Data checking method and equipment thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710644918.3A CN107403112B (en) 2017-07-31 2017-07-31 Data checking method and equipment thereof

Publications (2)

Publication Number Publication Date
CN107403112A true CN107403112A (en) 2017-11-28
CN107403112B CN107403112B (en) 2020-07-31

Family

ID=60402245

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710644918.3A Active CN107403112B (en) 2017-07-31 2017-07-31 Data checking method and equipment thereof

Country Status (1)

Country Link
CN (1) CN107403112B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108089956A (en) * 2017-12-07 2018-05-29 畅捷通信息技术股份有限公司 Verify the method and system of the returned data of interface
CN108696598A (en) * 2018-07-26 2018-10-23 廊坊新奥燃气设备有限公司 The message for receiving stateless service under a kind of micro services framework passes through the long method and apparatus for connecting transparent transmission
CN110377471A (en) * 2019-07-17 2019-10-25 江苏满运软件科技有限公司 Generation method, device, storage medium and the electronic equipment of interface check data
CN117707653A (en) * 2024-02-06 2024-03-15 天津医康互联科技有限公司 Parameter monitoring method, device, electronic equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN105868050A (en) * 2015-12-29 2016-08-17 乐视网信息技术(北京)股份有限公司 Verification method and device based on JSON data
CN105893237A (en) * 2015-08-04 2016-08-24 乐视致新电子科技(天津)有限公司 Test data driving method and equipment
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106155891A (en) * 2015-04-02 2016-11-23 阿里巴巴集团控股有限公司 Interface test method, interface description data library generating method and device
CN105099811A (en) * 2015-06-03 2015-11-25 北京金山安全软件有限公司 Interface testing method and device
CN105893237A (en) * 2015-08-04 2016-08-24 乐视致新电子科技(天津)有限公司 Test data driving method and equipment
CN105868050A (en) * 2015-12-29 2016-08-17 乐视网信息技术(北京)股份有限公司 Verification method and device based on JSON data

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108089956A (en) * 2017-12-07 2018-05-29 畅捷通信息技术股份有限公司 Verify the method and system of the returned data of interface
CN108089956B (en) * 2017-12-07 2021-05-04 畅捷通信息技术股份有限公司 Method and system for verifying returned data of interface
CN108696598A (en) * 2018-07-26 2018-10-23 廊坊新奥燃气设备有限公司 The message for receiving stateless service under a kind of micro services framework passes through the long method and apparatus for connecting transparent transmission
CN108696598B (en) * 2018-07-26 2021-04-13 廊坊新奥智能科技有限公司 Method and device for transparently transmitting message received by stateless service through long connection under micro-service architecture
CN110377471A (en) * 2019-07-17 2019-10-25 江苏满运软件科技有限公司 Generation method, device, storage medium and the electronic equipment of interface check data
CN110377471B (en) * 2019-07-17 2022-08-23 江苏满运软件科技有限公司 Interface verification data generation method and device, storage medium and electronic equipment
CN117707653A (en) * 2024-02-06 2024-03-15 天津医康互联科技有限公司 Parameter monitoring method, device, electronic equipment and computer readable storage medium
CN117707653B (en) * 2024-02-06 2024-05-10 天津医康互联科技有限公司 Parameter monitoring method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN107403112B (en) 2020-07-31

Similar Documents

Publication Publication Date Title
CN103220325B (en) For the method and system for managing nextport hardware component NextPort in cloud computing environment
CN109002842A (en) Image-recognizing method and device
CN107403112A (en) Data verification method and its equipment
CN104572167B (en) The method and computer system of starting and the unmanned application program participated in of management
US10044837B2 (en) Generation and distribution of named, definable, serialized tokens
CN104714529B (en) Remote monitoring platform system of electric automobile
CN107066609A (en) Image display method and device
CN109074265A (en) The preformed instruction of mobile cloud service
CN110109979A (en) A kind of allocation list radio button method and apparatus
CN109684188A (en) Test method and device
CN110232091A (en) Mthods, systems and devices for synchrodata
CN110427304A (en) O&M method, apparatus, electronic equipment and medium for banking system
CN109254914A (en) Software development kit test method, system, computer installation and readable storage medium storing program for executing
CN108182472A (en) For generating the method and apparatus of information
CN106465113A (en) Venue-specific wi-fi connectivity notifications
CN105511914B (en) Using update method, device and system
CN109218041A (en) Request processing method and device for server system
CN109885564A (en) Method and apparatus for sending information
CN111798251A (en) Verification method and device of house source data and electronic equipment
CN110347380A (en) Front and back end development approach and equipment
CN109871294A (en) Method and apparatus for verifying data, processing request
CN109145591A (en) The plug-in loading method of application program
CN109413212A (en) Method and apparatus for handling request
CN109688174A (en) A kind of virtual service implementation method and device based on more agents service
CN106603604A (en) Method and device of triggering transaction processing motion

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
CB03 Change of inventor or designer information

Inventor after: Li Shuqian

Inventor after: Zhu Dewei

Inventor before: Zhu Dewei

CB03 Change of inventor or designer information
GR01 Patent grant
GR01 Patent grant