CN113592490A - Data processing method and device, storage medium and electronic device - Google Patents

Data processing method and device, storage medium and electronic device Download PDF

Info

Publication number
CN113592490A
CN113592490A CN202110809225.1A CN202110809225A CN113592490A CN 113592490 A CN113592490 A CN 113592490A CN 202110809225 A CN202110809225 A CN 202110809225A CN 113592490 A CN113592490 A CN 113592490A
Authority
CN
China
Prior art keywords
information
verification result
data
result information
target data
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
CN202110809225.1A
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.)
Qingdao Haier Technology Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Technology Co Ltd
Haier Smart Home 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 Qingdao Haier Technology Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Technology Co Ltd
Priority to CN202110809225.1A priority Critical patent/CN113592490A/en
Publication of CN113592490A publication Critical patent/CN113592490A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/38Payment protocols; Details thereof
    • G06Q20/382Payment protocols; Details thereof insuring higher security of transaction
    • G06Q20/3821Electronic credentials
    • G06Q20/38215Use of certificates or encrypted proofs of transaction rights
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0633Lists, e.g. purchase orders, compilation or processing
    • G06Q30/0635Processing of requisition or of purchase orders

Abstract

The invention discloses a data processing method and device, a storage medium and an electronic device, wherein the data processing method comprises the following steps: acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying preset data to acquire first information and second information; verifying the first information to obtain verification result information; target data is determined based on the verification result information and the second information. By adopting the technical scheme, the preset data is classified and then processed, and only the classified part of the preset data is verified, so that the workload of data processing is reduced, and the problem of low data processing efficiency in the related technology is solved.

Description

Data processing method and device, storage medium and electronic device
Technical Field
The present invention relates to the field of data processing, and in particular, to a method and an apparatus for processing data, a storage medium, and an electronic apparatus.
Background
In order to meet the requirements of the service platform on the payment transaction capability or other interaction capabilities of other platforms, the service platform develops an external public interface, and different methods for encrypting the verification of interaction data are required due to different platforms, which results in extremely low scene-by-scene testing efficiency in the testing and verification process aiming at a large number of conventional and abnormal scenes. Meanwhile, when the verification encryption logic of the external platform interface is complex, the test efficiency is extremely low in a large number of scene tests, and the full scene test verification efficiency is low in daily iteration of the external public interface.
In the prior art, the test of the scenes mainly adopts Postman software for testing, the test process is executed according to the interface sequence in the Collision, the verification logic cannot be automatically switched according to the actual service scene, and only the Postman software, other online encryption tools and corresponding Csv files can be adopted to complete the test task. Further, there are several problems with the prior art Postman software: postman software is adopted to only support sequential execution of a test flow, and cannot automatically run according to actual service requirements; the function of the Postman software to output specified data without self-definition; the Postman software cannot perform encryption calculation, only can be encrypted by other encryption tools, and the online encryption tools have security risks such as data leakage; when the abnormal conditions need to be simulated according to the actual service scene in the test process, the number of the simulation parameters is exponentially increased, and the Postman running speed is low.
Disclosure of Invention
The embodiment of the invention provides a data processing method and device, a storage medium and an electronic device, and aims to at least solve the problems of low data processing efficiency and the like in the related art.
According to an embodiment of the present invention, there is provided a data processing method, including: acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying the preset data to acquire the first information and the second information; verifying the first information to obtain verification result information; determining target data based on the verification result information and the second information.
In an exemplary embodiment, after acquiring the target data based on the verification result information and the second information, the method further includes: and determining whether the target data is legal or not, returning the target data under the condition that the target data is legal, and generating preset information under the condition that the target data is illegal.
In one exemplary embodiment, verifying the first information to obtain the verification result information includes: and in the case that the first information comprises the user information, calling a login interface based on the user information to acquire login result information.
In an exemplary embodiment, the step of obtaining the authentication result information by authenticating the first information after the user information carries token information and the login interface is called based on the user information to obtain the login result information further includes: determining whether the token information requires replacement; under the condition that the token information is determined to need replacement, a replacement interface is called based on the login result information to obtain the verification result information; and under the condition that the token information is determined not to need replacement, directly determining the login result information as the verification result information.
In one exemplary embodiment, verifying the first information to obtain verification result information further comprises: determining whether the identification information includes the token information in a case where the first information includes the identification information; in a case where it is determined that the identification information includes the token information, calling the login interface based on the identification information to obtain the login result information, and calling the replacement interface based on the login result information to obtain the verification result information; in a case where it is determined that the identification information does not include the token information, encrypting the identification information to acquire the verification result information.
In one exemplary embodiment, the obtaining the target data based on the verification result information and the second information includes: and calling a functional interface based on the verification result information and the second information to acquire the target data, wherein the functional interface is an order interface for creating or an order interface for inquiring.
In one exemplary embodiment, invoking a functional interface to obtain the target data based on the verification result information and the second information comprises: and decrypting the target data through the functional interface to obtain decrypted data, and generating the target data based on the decrypted data.
According to another embodiment of the present invention, there is also provided a data processing apparatus including: the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module acquires preset data, the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; the classification module is used for classifying the preset data to acquire the first information and the second information; the verification module is used for verifying the first information to obtain verification result information; and the determining module is used for acquiring determination target data based on the verification result information and the second information.
According to another aspect of the embodiments of the present invention, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the above data processing method when running.
According to another aspect of the embodiments of the present invention, there is also provided an electronic apparatus, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for processing data through the computer program.
In the embodiment of the invention, preset data is obtained, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying the preset data to acquire the first information and the second information; verifying the first information to obtain verification result information; determining target data based on the verification result information and the second information. The method comprises the steps of classifying preset data to obtain first information and second information, verifying the first information to obtain verification result information, and finally obtaining target data according to the verification result information and the second information. By adopting the technical scheme, the preset data is classified and then processed, and only the classified part of the preset data is verified, so that the workload of data processing is reduced, and the problem of low data processing efficiency in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a computer terminal of a data processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a method of processing data according to an embodiment of the invention;
FIG. 3 is a flow chart of a method of processing data according to an embodiment of the invention;
FIG. 4 is a schematic diagram of a process for creating order data according to an embodiment of the invention;
FIG. 5 is a diagram illustrating a processing method for querying order data according to an embodiment of the invention;
fig. 6 is a block diagram of a data processing apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above 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 is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are 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, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The method provided by the embodiment of the application can be executed in a computer terminal, a computer terminal or a similar operation device. Taking the example of the present invention running on a computer terminal, fig. 1 is a block diagram of a hardware structure of a computer terminal of a data processing method according to an embodiment of the present invention. As shown in fig. 1, the computer terminal may include one or more (only one shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and in an exemplary embodiment, may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration with equivalent functionality to that shown in FIG. 1 or with more functionality than that shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data processing method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the above-mentioned method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
Fig. 2 is a schematic diagram of a data processing method according to an embodiment of the present invention, including the following steps:
step S102, acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information;
step S104, classifying the preset data to acquire the first information and the second information;
step S106, verifying the first information to obtain verification result information;
step S108, determining target data based on the verification result information and the second information.
In the data processing method, preset data is acquired, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying the preset data to acquire the first information and the second information; verifying the first information to obtain verification result information; determining target data based on the verification result information and the second information. The method comprises the steps of classifying preset data to obtain first information and second information, verifying the first information to obtain verification result information, and finally obtaining target data according to the verification result information and the second information. By adopting the technical scheme, the preset data is classified and then processed, and only the classified part of the preset data is verified, so that the workload of data processing is reduced, and the problem of low data processing efficiency in the related technology is solved.
In a preferred embodiment, the above-mentioned data processing method may be used for service testing of a platform, and in step 102, the preset data is used for simulating scene parameters of a plurality of third-party system platforms, the preset data is written in advance and stored in a local testing end, the preset data is stored in an EXCEL table, and it should be noted that the preset data is stored in an ACCESS table or other databases. The first information comprises the user information and the identification information, the first information is to-be-verified information which can be understood as the first information to be verified to test the safety of platform services, the identification information can be understood as third party or caller ID information, and the identification information is unique and corresponds to the caller one to one. The second information is used for characterizing the transaction information, and it is understood that the second information at least includes one of invoice information, commodity information, order information, additional information and address information, and the second information may also include other forms of transaction information. In step 104, classifying the preset data to obtain the first information and the second information may be understood as identifying the preset data to obtain the first information and the second information, for example, when the invoice information is identified, determining the invoice information as the second information. In step S108, determining the target data based on the verification result information and the second information includes calling a functional interface to acquire the target data based on the verification result information and the second information.
In an exemplary embodiment, after acquiring the target data based on the verification result information and the second information, the method further includes: and determining whether the target data is legal or not, returning the target data under the condition that the target data is legal, and generating preset information under the condition that the target data is illegal.
In other words, after the target data is acquired based on the verification result information and the second information, whether the target data is legal or not is judged, if the target data is determined to be legal, a success state is added, the corresponding target data is output and transmitted, and if the target data is determined to be illegal, a failure state is added, error information is prompted, and a subsequent report is generated.
In one exemplary embodiment, verifying the first information to obtain the verification result information includes: and in the case that the first information comprises the user information, calling a login interface based on the user information to acquire login result information.
Specifically, the login interface is a preset interface, the user information includes a user name and a password, the login interface is called based on the user name and the password, the login interface and a user center are accessed to obtain login result information, and the user center is a preset database.
In an exemplary embodiment, the step of obtaining the authentication result information by authenticating the first information after the user information carries token information and the login interface is called based on the user information to obtain the login result information further includes: determining whether the token information requires replacement; under the condition that the token information is determined to need replacement, a replacement interface is called based on the login result information to obtain the verification result information; and under the condition that the token information is determined not to need replacement, directly determining the login result information as the verification result information.
In other words, after obtaining the login result information, the token information needs to be identified first to determine whether the token information needs to be replaced, in the case that the token information needs to be replaced, the login result information is used as data input to call a replacement interface to obtain the verification result information, and in the case that the token information does not need to be replaced, the login result information is passed to the next step as the verification result information.
In one exemplary embodiment, verifying the first information to obtain verification result information further comprises: determining whether the identification information includes the token information in a case where the first information includes the identification information; in a case where it is determined that the identification information includes the token information, calling the login interface based on the identification information to obtain the login result information, and calling the replacement interface based on the login result information to obtain the verification result information; in a case where it is determined that the identification information does not include the token information, encrypting the identification information to acquire the verification result information.
That is, it is first determined whether the identification information includes the token information, and then, in a case where it is determined that the identification information includes the token information, a login interface is called as data input and the login result information is obtained, and a permutation interface is called as data input and the authentication result information is obtained.
In one exemplary embodiment, the obtaining the target data based on the verification result information and the second information includes: and calling a functional interface based on the verification result information and the second information to acquire the target data, wherein the functional interface is an order interface for creating or an order interface for inquiring.
In one exemplary embodiment, invoking a functional interface to obtain the target data based on the verification result information and the second information comprises: and decrypting the target data through the functional interface to obtain decrypted data, and generating the target data based on the decrypted data.
In order to better understand the process of the data processing method, the following describes a flow of an implementation method of the data processing with reference to an alternative embodiment, but the flow is not limited to the technical solution of the embodiment of the present invention.
In the present embodiment, a data processing method is provided, and fig. 3 is a flowchart of a data processing method according to an embodiment of the present invention, where as shown in fig. 3, the flowchart includes the following steps:
step S301: acquiring preset data;
it should be noted that the preset data may be stored in a prepared EXCEL table or other form of data storage file.
Step S302: classifying the preset data to acquire the first information and the second information;
specifically, the first information is used for representing information to be verified, the second information is used for representing transaction information, the first information includes user information or identification information, the second information at least includes one of invoice information, commodity information, order information, additional information and address information, and the second information may further include other transaction information;
when the first information includes the identification information, performing step S303; when the first information includes the user information, step S304 is performed.
Step S303: determining whether the identification information includes token information;
in a case where it is determined that the identification information includes the token information, step S307 is executed; in a case where it is determined that the identification information does not include the token information, step S308 is performed.
Step S304: calling the login interface based on user information to acquire login result information;
step S305: determining whether the token information requires replacement;
in a case where it is determined that the token information needs to be replaced, performing step S309; in case it is determined that the token information does not need to be replaced, step S306 is performed.
Step S306: determining the login result information as verification result information;
after determining that the login result information is the verification result information, step S310 is executed.
Step S307: calling the login interface based on the identification information to acquire login result information;
after the login interface is called based on the identification information to obtain the login result information, step S309 is executed.
Step 308: verifying the identification information to obtain verification result information;
after verifying the identification information to obtain the verification result information, step S310 is executed.
Step 309: calling a replacement interface based on the login result information to acquire verification result information;
step 310: acquiring target data based on the verification result information and the second information;
step 311: determining whether the target data is legal;
further, the steps can be used in the testing process of the platform service.
In the data processing method, firstly, preset data is obtained, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying the preset data to acquire the first information and the second information; verifying the first information to obtain verification result information; determining target data based on the verification result information and the second information. The method comprises the steps of classifying preset data to obtain first information and second information, verifying the first information to obtain verification result information, and finally obtaining target data according to the verification result information and the second information. By adopting the technical scheme, the preset data is classified and then processed, and only the classified part of the preset data is verified, so that the workload of data processing is reduced, and the problem of low data processing efficiency in the related technology is solved.
FIG. 4 is a schematic diagram of a process for creating order data according to an embodiment of the invention; as shown in fig. 4, includes:
s401, a user initiates an order;
initiating a user order may be understood as initiating an order creating request, where the order creating request carries creating request information, where the creating request information includes other information, and the other information is used to represent transaction information.
S402, determining whether a user center identifier is included;
specifically, it is determined whether a user hub identifier is included in the request information, step S404 is performed if it is determined that the user hub identifier is included in the request information, and step S405 is performed if it is determined that the user hub identifier is not included in the request information, where the user hub identifier is equivalent to the token information.
S403, accessing a login interface;
specifically, after the login interface is called according to the user center identifier, step S406 is executed.
S404, generating a signature;
specifically, after generating the signature information based on the user center identifier, step S407 is executed.
S405, accessing a user center to obtain a user identifier;
and further, accessing the user center according to the user center identification, and acquiring the user identification.
S406, calling an order creating interface to create an order;
specifically, creating an order may be understood as generating order result information based on the other information and the user identification or generating order result information based on the other information and the signature information.
S407, target data is returned.
Specifically, returning the target data may be understood as returning order result information.
For example, the processing method for creating an order may be used in an order creating process of an online mall, that is, a caller platform verifies the user identifier or the signature information and the other information by using the user identifier generated based on the user center identifier or the signature information generated after encryption calculation as a unique identifier and using the other information as an order creating interface for entering and calling the online mall, and generates the order result information under the condition that the verification is passed, where the other information includes, but is not limited to, commodity information, quantity information, invoice information, attachment information, and address information, and the order result information includes information such as a network order number and a payment link. After the order result information is generated, the caller identification and the order number and the ordering time are recorded and stored as information records, and the information records are returned to the caller platform for payment link, so that the transaction process of the online shopping mall and a plurality of transaction platforms can be completed.
FIG. 5 is a diagram illustrating a processing method for querying order data according to an embodiment of the invention; as shown in fig. 5, includes:
s501, a user initiates a query;
the query initiated by the user may be understood as initiating a query order request, where the query order request carries query request information.
S502, calling an order query interface;
s503, obtaining order information;
the step of invoking the order query interface may be understood as invoking the order query interface based on the query request information to obtain the order information.
S504, generating order detail information;
specifically, generating the order detail information may be understood as combining the order information, the order placing time information, and the like to generate the order detail information.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
An embodiment of the present invention further provides a data processing apparatus, where the data processing apparatus includes: the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module acquires preset data, the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; the classification module is used for classifying the preset data to acquire the first information and the second information; the verification module is used for verifying the first information to obtain verification result information; and the determining module is used for acquiring determination target data based on the verification result information and the second information.
Fig. 6 is a block diagram of a data processing apparatus according to an embodiment of the present invention; as shown in fig. 6, includes:
the acquiring module 42 acquires preset data, where the preset data includes first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information includes user information or identification information;
a classification module 44, configured to classify the preset data to obtain the first information and the second information;
a verification module 46, configured to verify the first information to obtain verification result information;
and a determination module 48 for acquiring determination target data based on the verification result information and the second information.
Through the device, preset data is obtained, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; classifying the preset data to acquire the first information and the second information; verifying the first information to obtain verification result information; determining target data based on the verification result information and the second information. The method comprises the steps of classifying preset data to obtain first information and second information, verifying the first information to obtain verification result information, and finally obtaining target data according to the verification result information and the second information. By adopting the technical scheme, the preset data is classified and then processed, and only the classified part of the preset data is verified, so that the workload of data processing is reduced, and the problem of low data processing efficiency in the related technology is solved.
Embodiments of the invention also provide a storage medium comprising a stored program, wherein the program performs any of the above methods when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store program codes for performing the following steps:
s1, acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information;
s2, classifying the preset data to obtain the first information and the second information;
s3, acquiring first data based on the second label information and the user mark information;
s3, verifying the first information to obtain verification result information;
s4, determining target data based on the verification result information and the second information.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information;
s2, classifying the preset data to obtain the first information and the second information;
s3, acquiring first data based on the second label information and the user mark information;
s3, verifying the first information to obtain verification result information;
s4, determining target data based on the verification result information and the second information.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
For example, the data processing method applied by the self is used for testing the online shopping mall, and comprises the following steps:
firstly, writing preset data in an Excel table stored in a local test terminal, namely, storing the preset data through the Excel table prepared in advance, and reading the preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information; then, classifying the preset data to obtain the first information and the second information, wherein the first information can be user information or identification information, the identification information can be understood as ID information of a third-party platform butted with the online shopping mall, and the ID information and the third-party platform have a one-to-one correspondence relationship;
under the condition that the first information comprises the user information, calling a mall login interface based on the user information to acquire login result information, namely calling the mall login interface when the first information is identified, and simulating a participation scene when a corresponding channel is actually used; determining whether the token information needs to be replaced; under the condition that the token information is determined to need replacement, a replacement interface is called based on the login result information to obtain the verification result information; under the condition that the token information is determined not to need replacement, directly determining the login result information as the verification result information;
determining whether the identification information includes the token information in a case where the first information includes the identification information; under the condition that the identification information is determined to include the token information, calling the mall login interface based on the identification information to obtain login result information, and calling the replacement interface based on the login result information to obtain verification result information, namely when the ID information of a third-party platform carrying the token information is identified, calling the replacement interface based on the login result information to simulate a parameter entering scene when a corresponding channel is used; and under the condition that the identification information does not comprise the token information, encrypting the identification information to obtain the verification result information, namely when the ID information of a third-party platform which does not carry the token information is identified, automatically sorting and encrypting the identification information according to external encryption logic of the online shopping mall, and outputting a ciphertext to simulate a participation scene when a corresponding channel is used.
Then, based on the verification result information and the second information, calling a functional interface to acquire the target data, wherein the functional interface is an order interface for creating or inquiring;
finally, whether the target data are legal or not is determined, the target data are returned under the condition that the target data are legal, preset information is generated under the condition that the target data are illegal, namely, the corresponding result is output and transmitted when the target data are legal according to the final target data judgment; and prompting corresponding error information when the target data is determined to be illegal.
Furthermore, the target data is received, preset data read from the Excel table is combined to serve as interface parameters of a scene, an interface is called, an output field specified by a local code is used, and meanwhile specified data are written into the Excel table and serve as a subsequent report to be output.
Therefore, by the data processing method, the encryption verification mode can be automatically selected according to the ID information of the third-party platform, the data can be automatically operated according to the appointed sequence only by presetting the data and starting the program, meanwhile, a tester only needs to maintain the preset data file, the test end can automatically calculate the operation times, further, target data generated after operation can be automatically written into an Excel form, and the tester can judge the test result only by comparing the expected result with the data written into the Excel form. Because the test data is only from the Excel table, only one or more rows of data are needed to be added in the Excel according to different test scenes, the maintenance is convenient, the record is convenient to check when the query is needed, and furthermore, the data processing method can be operated once according to row reading when the preset data is read, so the test efficiency is greatly improved. The data processing method can be realized by adopting Python language programming, and the data processing method based on the Python programming has the following advantages: the Python language is relatively open, and a great number of supporting libraries are provided, so that the data processing method can judge corresponding contents which need to be executed in any scene according to the actual service scene; the Python language is built in and has more functions depending on other libraries, and the encryption mode of an external interface for operation is supported, such as the encryption modes of Md5, 3Des, Base64 translation and the like; the processing method for realizing data based on Python programming has the advantages of extremely high speed of calling an interface through the script, low maintenance cost and no need of other cost for long-term use.
The above is only a preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes will occur to those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method for processing data, comprising:
acquiring preset data, wherein the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information;
classifying the preset data to acquire the first information and the second information;
verifying the first information to obtain verification result information;
determining target data based on the verification result information and the second information.
2. The method according to claim 1, wherein after acquiring the target data based on the verification result information and the second information, the method further comprises:
and determining whether the target data is legal or not, returning the target data under the condition that the target data is legal, and generating preset information under the condition that the target data is illegal.
3. The method of processing data according to claim 2, wherein verifying the first information to obtain the verification result information includes:
and in the case that the first information comprises the user information, calling a login interface based on the user information to acquire login result information.
4. The data processing method of claim 3, wherein the user information carries token information, and after the login interface is called based on the user information to obtain the login result information, the verifying the first information to obtain the verification result information further comprises:
determining whether the token information requires replacement;
under the condition that the token information is determined to need replacement, a replacement interface is called based on the login result information to obtain the verification result information;
and under the condition that the token information is determined not to need replacement, directly determining the login result information as the verification result information.
5. The method of claim 4, wherein verifying the first information to obtain verification result information further comprises:
determining whether the identification information includes the token information in a case where the first information includes the identification information;
in a case where it is determined that the identification information includes the token information, calling the login interface based on the identification information to obtain the login result information, and calling the replacement interface based on the login result information to obtain the verification result information;
in a case where it is determined that the identification information does not include the token information, encrypting the identification information to acquire the verification result information.
6. The method according to claim 5, wherein acquiring the target data based on the verification result information and the second information comprises:
and calling a functional interface based on the verification result information and the second information to acquire the target data, wherein the functional interface is an order interface for creating or an order interface for inquiring.
7. The method of claim 6, wherein invoking a functional interface to obtain the target data based on the verification result information and the second information comprises:
and decrypting the target data through the functional interface to obtain decrypted data, and generating the target data based on the decrypted data.
8. An apparatus for processing data, comprising:
the system comprises an acquisition module, a verification module and a verification module, wherein the acquisition module acquires preset data, the preset data comprises first information and second information, the first information is used for representing information to be verified, the second information is used for representing transaction information, and the first information comprises user information or identification information;
the classification module is used for classifying the preset data to acquire the first information and the second information;
the verification module is used for verifying the first information to obtain verification result information;
a determination module that determines target data based on the verification result information and the second information.
9. A computer-readable storage medium, comprising a stored program, wherein the program is operable to perform the method of any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method of any of claims 1 to 7 by means of the computer program.
CN202110809225.1A 2021-07-16 2021-07-16 Data processing method and device, storage medium and electronic device Pending CN113592490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110809225.1A CN113592490A (en) 2021-07-16 2021-07-16 Data processing method and device, storage medium and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110809225.1A CN113592490A (en) 2021-07-16 2021-07-16 Data processing method and device, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN113592490A true CN113592490A (en) 2021-11-02

Family

ID=78247947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110809225.1A Pending CN113592490A (en) 2021-07-16 2021-07-16 Data processing method and device, storage medium and electronic device

Country Status (1)

Country Link
CN (1) CN113592490A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776923A (en) * 2018-06-05 2018-11-09 深圳壹账通智能科技有限公司 Order method of payment, system, computer equipment and storage medium
CN111181728A (en) * 2019-12-24 2020-05-19 西安万像电子科技有限公司 Data processing method and device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108776923A (en) * 2018-06-05 2018-11-09 深圳壹账通智能科技有限公司 Order method of payment, system, computer equipment and storage medium
CN111181728A (en) * 2019-12-24 2020-05-19 西安万像电子科技有限公司 Data processing method and device

Similar Documents

Publication Publication Date Title
CN108734028B (en) Data management method based on block chain, block chain link point and storage medium
CN107894952A (en) Generation method, device, equipment and the readable storage medium storing program for executing of interface testing use-case
CN111478967B (en) Request processing method and device
CN108897691A (en) Data processing method, device, server and medium based on interface analog service
CN105303112B (en) The detection method and device of component call loophole
CN110351346A (en) A kind of eSIM changes chucking method and relevant device
JP2009528734A (en) Improved method and system for testing a subscriber identity module (SIM) application toolkit
CN106878108B (en) Network flow playback test method and device
CN111611559A (en) Identity verification method and device
US20130183948A1 (en) Application Store System and Development Method Using the Application Store System
CN113014475B (en) Message pushing integration method and device
CN109726134B (en) Interface test method and system
CN108174377B (en) Method and system for opening number
CN109669859A (en) Service test method, device, computer equipment and storage medium
CN108055238A (en) A kind of account verification method and system
CN105933905A (en) Method and device for realizing wireless access point connection authentication
CN108990047A (en) Test method, device and the medium of contract signing relationship management data preparation platform
CN105099983A (en) Authorization method, authority setting method and devices
CN105993156A (en) Server access authentication method and device
CN109783357A (en) The method and device of test application program, computer equipment, storage medium
CN103559430B (en) application account management method and device based on Android system
CN107145342A (en) The treating method and apparatus of the channel information of application
CN112905437A (en) Method and device for testing case and storage medium
CN113592490A (en) Data processing method and device, storage medium and electronic device
CN113645054A (en) Wireless network equipment configuration method and system

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