Method, device and equipment for verifying material system
By rehearsing the access, ordering and production process of the code material system in the simulation environment, and verifying the functions of the material system, the problem of low efficiency in identifying code material configuration anomalies has been solved, and efficient identification of function correctness anomalies has been achieved, avoiding the need for manual verification. shortcomings, reducing costs and risks.
Patent Information
- Application Number
- CN202410668786.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-27
- Publication Date
- 2024-09-06
AI Technical Summary
In the existing technology, the problem of abnormal code material configuration is complex and difficult to identify, and relying on manual verification is inefficient. It is easy to cause verification omissions due to insufficient manual experience, making it difficult to detect functional correctness problems in a timely manner, which may lead to user complaints and capital losses.
In the simulation environment, by rehearsing the access, ordering and production process of coded materials, the functionality of the material system is verified, the consistency of the configuration data is ensured, and abnormal coded material configurations are identified to avoid problems in the actual production environment.
It achieves efficient and effective identification of abnormal function correctness problems of the material system, reduces costs, avoids customer complaints and capital losses in advance, and improves configuration accuracy.
Smart Images

Figure CN118608233A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and equipment for verifying a material system. Background Art
[0002] With the widespread popularization of mobile Internet technology, more and more offline and online scenarios have begun to merge and land. In the O2O (Offline To Online) process, code materials are one of the widely used media when diverting traffic from offline to online applications. Usually, the code material system is provided by the supplier of code materials. Users or merchants who are demanders of code materials can browse and purchase code materials in the code material system and obtain the completed code materials, and then put the code materials into use. In this process, in order to ensure that the code material demanders can browse, purchase, and obtain the code materials normally, and the obtained code materials can be used normally, it is necessary to correctly configure the code material system on the code material configuration platform.
[0003] In specific applications, due to the wide variety and different forms of code materials, the configuration methods vary greatly, and the high configuration complexity. In addition, since the configuration of code materials in the code material configuration platform involves multiple configuration items, multiple business systems, and multiple business roles, the problems of abnormal code material configuration are diverse and difficult to identify.
[0004] At present, the problem of abnormal configuration of code materials mainly relies on manual verification. Specifically, after configuration, the configuration personnel place an order to verify whether the code materials can be produced normally and whether there are any problems with the produced code materials. This verification method is not only inefficient but also prone to verification omissions due to the lack of manual experience of the configuration personnel. Therefore, it is necessary to provide an efficient and effective method for identifying abnormal configuration of code materials. Summary of the invention
[0005] In view of this, embodiments of the present application provide methods, devices and equipment for verifying material systems to solve the problems of low efficiency and reliance on manual experience in existing methods for manually verifying the functional correctness of material systems.
[0006] According to a first aspect of an embodiment of the present application, a method for verifying a material system is provided, wherein the method is run in a simulation environment, and the configuration data of the simulation environment is consistent with the configuration data of the operating environment of the material system; the method comprises:
[0007] Sending a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier;
[0008] If the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, a commodity order request is sent to the material system to obtain order status information of an order created by the material system in response to the commodity order request;
[0009] If the order status information indicates that the order is in a paid state, obtaining production data for executing the production task corresponding to the order;
[0010] If the production materials are consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
[0011] According to a second aspect of an embodiment of the present application, a device for verifying a material system is provided, wherein the device operates in a simulation environment, and the configuration data of the simulation environment is consistent with the configuration data of the operating environment of the material system; the device comprises:
[0012] An access function verification module is used to send a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier;
[0013] An order function verification module, configured to send a commodity order request to the material system if the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, and obtain order status information of an order created by the material system in response to the commodity order request;
[0014] A production function verification module, used for obtaining production data for executing the production task corresponding to the order if the order status information indicates that the order is in a paid state;
[0015] A function verification module is used to determine that the material system verification has passed if the production data is consistent with the code material configuration data of the commodity.
[0016] According to a third aspect of an embodiment of the present application, there is provided a device for verifying a material system, which runs in a simulation environment, wherein the simulation environment is consistent with configuration data of an operating environment where the material system is located; the device comprises:
[0017] at least one processor; and,
[0018] a memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0020] Sending a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier;
[0021] If the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, a commodity order request is sent to the material system to obtain order status information of an order created by the material system in response to the commodity order request;
[0022] If the order status information indicates that the order is in a paid state, obtaining production data for executing the production task corresponding to the order;
[0023] If the production materials are consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
[0024] One embodiment of the present specification can achieve at least the following beneficial effects: by rehearsing the entire process from commodity access, commodity ordering, commodity production to commodity use based on the material system, it is verified whether the material system has the problem of being unable to provide the expected functions for the code material demand users, and the verification is realized before the material system is put into the actual production environment, which can effectively, efficiently and relatively low-cost identify the abnormal problems of the functional correctness of the material system. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0026] Figure 1 A schematic diagram of the overall solution flow of a method for identifying abnormal material configuration of a code provided in an embodiment of this specification;
[0027] Figure 2 A schematic diagram of a method for verifying a material system provided in an embodiment of this specification;
[0028] Figure 3 A schematic diagram of the process of accessing pre-code material commodities provided in an embodiment of this specification is shown;
[0029] Figure 4 A schematic diagram of the process of purchasing pre-code material commodities provided in the embodiment of this specification is shown;
[0030] Figure 5 and Figure 6 The schematic diagram of the process of producing pre-coded material commodities provided in the embodiment of this specification is shown, wherein: Figure 5 The figure shows the process of issuing asynchronous listening tasks for querying the status of commodity production tasks. Figure 6 The execution process of the asynchronous monitoring task for querying the status of the commodity production task is shown;
[0031] Figure 7 A schematic diagram showing the process of using pre-coded material commodities provided in the embodiments of this specification is shown;
[0032] Figure 8 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a device for verifying a material system;
[0033] Fig. 9 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a device for calibrating a material system. DETAILED DESCRIPTION
[0034] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0035] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0036] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0037] First, the terms involved in one or more embodiments of the present application are explained.
[0038] Code material: also known as identification code material, can refer to physical or electronic materials containing identification codes (for example, QR codes). In specific applications, code materials are of various types and in different forms. For example, according to the material medium, code materials can include physical materials and electronic materials. For another example, according to the category of code materials (i.e., the business function reflected by the identification code), code materials can include red envelope code materials, money collection code materials, marketing code materials, etc., but not limited to this. For another example, according to the form of code materials, code materials can include stickers, stand-up signs, hanging signs, hanging tags, IOT equipment, posters, door stickers, and can also be daily necessities such as electronic scales and welcoming lights, but not limited to this. For another example, for the category of money collection codes, according to the personal configuration of the code material demander, it can include empty codes and personalized codes. Because code materials are accompanied by code information, users can transfer resources, access information, participate in various activities of platforms or merchants, etc. by scanning codes.
[0039] Code material system: also known as code material supply system or material system, refers to the transaction production chain composed of multiple upstream and downstream institutions that provides code material products or services to code material demanders (i.e., code material consumers) during the production and circulation of code materials.
[0040] Code material configuration: The configuration of the code material system is performed on the code material configuration platform to ensure that the code material system can normally realize the code material supply function. The configuration of code materials has the following characteristics: 1) From the perspective of the code materials themselves, code materials are of various categories and forms, so the configuration methods vary greatly and the configuration complexity is very high; 2) The configuration of a code material will involve multiple configuration items, multiple systems, and multiple roles; for example, the configuration items involved may include code type configuration, combined image configuration, material template configuration, product configuration, activity configuration, shelf / release configuration, etc.; for another example, the systems involved may include code platform, multimedia platform (creative material platform), code platform, supply chain platform, material customer service workbench, etc.; for another example, the roles involved may include business operations, design, procurement, supply chain operations, sales operations, etc.; therefore, the configuration is also complex and prone to errors; 3) From the perspective of the personnel involved in the configuration of code materials, the code material configuration platform, as a platform, is oriented to various upper-level businesses and supports the needs of various businesses for materials, such as money collection codes, inter-linked installment code materials, car moving code materials, five blessings materials, red envelope code materials, etc. The upper-level business configuration parties have different understandings of materials, and it is easier to have configuration abnormalities.
[0041] In specific applications, there are various problems that may arise with abnormal configuration of code materials. For example, from the perspective of the user who needs code materials, the user who needs code materials cannot normally access or purchase code material products, the user cannot normally produce code material products after purchase, the produced code material products cannot be used normally, etc. For example, for code materials for collecting money, if the configuration personnel do not configure the pre-contract, the merchant who has not signed the agreement for collecting money code cannot use the purchased money code after purchase. For another example, for code material products placed in the promotion venue, the label configuration of the user who purchased the code material product is wrong, resulting in the user not being labeled with the corresponding label after purchase, and the venue rights cannot be issued to the user normally. The aforementioned problem of abnormal configuration of code materials belongs to the problem of functional correctness. In the embodiments of this specification, the problem of functional correctness may refer to the problem that the expected functions provided to the user who needs code materials cannot be realized. Usually, functional correctness problems cannot (or cannot be completely) discovered through automated anomaly identification of static configuration data. Therefore, the existing technology mainly relies on manual verification. Specifically, after configuration, the configuration personnel place an order to verify whether the code materials can be produced normally and whether the produced code materials have any problems. This verification method is not only inefficient but also prone to verification omissions due to the lack of manual experience of the configuration personnel. If functional correctness problems cannot be discovered in time, it is easy to lead to user complaints and public opinion, and some configuration errors may also lead to asset losses.
[0042] In the embodiments of this specification, a method for identifying abnormal configuration of code materials including functional correctness problems is proposed. In a simulation environment (non-production environment / quasi-production environment), the entire process of code material access, code material purchase, code material production and code material use is previewed for the current code material configuration, so as to discover configuration abnormalities involving the entire life cycle of the code material, so as to avoid adverse consequences such as customer complaints and asset losses in advance.
[0043] Figure 1 A schematic diagram of the overall solution flow of a method for identifying abnormal code material configuration provided in an embodiment of this specification.
[0044] like Figure 1 As shown, when the code material configuration changes (for example, after creating a new code material configuration data or modifying the code material configuration data), the following steps can be executed: Figure 1 The process shown is: access to the preview code material commodity (step 101), purchase of the preview code material commodity (step 102), production of the preview code material commodity (step 103), and use of the preview code material commodity (step 104). If each module executes normally, it indicates that there is no functional problem with the current code material configuration; if at least any module in each module returns an abnormal execution result, it indicates that there is a functional problem with the code material configuration.
[0045] In specific applications, in order to avoid disturbing the production environment, such as Figure 1 The process shown is executed in a simulation environment (non-production environment / quasi-production environment). Figure 1 Before the solution of abnormal identification of code material configuration shown, the data of production environment configuration needs to be synchronized to the simulation environment in real time. Specifically, the real-time synchronization of the configuration data related tables involved can be turned on. After turning it on, the configuration data related to the production environment will be synchronized to the simulation environment in real time.
[0046] In the present application, a method for verifying a material system is provided. The present application also relates to an apparatus and a computing device for verifying a material system, which are described in detail one by one in the following embodiments.
[0047] Figure 2 A flow chart of a method for verifying a material system provided in an embodiment of this specification.
[0048] In specific applications, the method is run in a simulation environment, and the simulation environment is consistent with the configuration data of the operating environment of the material system to be verified. Specifically, the real-time synchronization of the tables related to the configuration data involved can be turned on in the simulation platform. After turning it on, the relevant configuration data of the production environment will be synchronized to the simulation environment in real time.
[0049] From the program perspective, the execution subject of the process can be a program installed on the application server. It can be understood that the method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities.
[0050] like Figure 2 As shown, the process may include the following steps:
[0051] Step 202: Send a commodity access request to the material system to obtain an access result; the commodity includes one or more coded materials; the commodity access request carries a constructed user identifier and a commodity identifier.
[0052] In the embodiments of the present specification, when the execution subject detects that the code material configuration data of the material system has changed, it can respond to the change and perform a check on the material system, that is, perform a check on the code material configuration data after the configuration of the material system has changed. In specific applications, the code material data change may include but is not limited to adding a new code material commodity, updating the configuration of an existing code material commodity, etc.
[0053] Specifically, when performing the functionality check on the material system, it is possible to first check whether the commodity access function of the material system after the material configuration data is changed is normal. More specifically, a commodity access request can be sent to the material system through a preview, and based on the access result, it is determined whether the commodity access function of the material system is normal.
[0054] In order to rehearse sending a commodity access request to the material system, it is necessary to pre-construct a user identifier and a commodity identifier. The constructed user identifier and commodity identifier may conform to a preset user identifier specification and commodity identifier specification, so that the material system can recognize the constructed user identifier and commodity identifier. In addition, the constructed commodity identifier may correspond to a code material commodity configured in the code material configuration data of the material system, so that the associated configuration data of the corresponding commodity can be verified through the rehearsal.
[0055] Among them, the commodity specifically refers to a code material commodity. In specific applications, the commodity identification of a code material commodity may correspond to one or a group of code materials. For example, a commodity identification may correspond to a code material group consisting of a payment code and a red envelope code at the same time. In specific verification, one or more code materials corresponding to a commodity identification may be verified as a whole unit.
[0056] Step 204: If the user represented by the user identifier belongs to the target group corresponding to the product identifier and the access result includes the product details information corresponding to the product identifier, a product order request is sent to the material system to obtain the order status information of the order created by the material system in response to the product order request.
[0057] In the material code configuration data of the material system, it is usually necessary to set the target population corresponding to each material code product, so as to provide specific products to specific users and display different products to different users. The product access module of the material system needs to ensure that the material system can feedback the correct access results to the user's product access request. That is, users who belong to the target population of the material code product should be able to obtain the corresponding product details; users who do not belong to the target population of the material code product should not obtain the corresponding product details.
[0058] In an embodiment of the present specification, after sending a commodity access request to the material system, an access result fed back by the material system can be obtained. Specifically, the access result may include a first access result or a second access result. The first access result may include commodity detail information. The commodity detail information is the commodity detail information obtained based on the commodity identifier, such as commodity type, commodity name, commodity image, etc. The second access result may include commodity unsaleable information. The commodity unsaleable information is information used to indicate that the commodity corresponding to the commodity identifier is unsaleable.
[0059] In some embodiments, when the user represented by the user identifier belongs to the target population corresponding to the product identifier, if the access result obtained in step 202 includes the product detail information corresponding to the product identifier, it indicates that the verification of the product access function of the material system has passed, and next, the verification of the product ordering function of the material system can be performed.
[0060] As described in step 204, the process of placing an order for a product can be rehearsed. Specifically, an order can be initiated to the material system, and the order status after the order is created can be verified to be normal. In specific applications, the user ID and product ID used in the verification of the product access function in step 202 of the previous stage can be continued, and the user ID and product ID can be carried in the product order request in step 204.
[0061] After receiving the commodity order request from the subject of this application, the material system can create an order and initiate checkout. After receiving the checkout success message, it updates the order status.
[0062] Step 206: If the order status information indicates that the order is in a paid state, then obtain production data for executing the production task corresponding to the order.
[0063] In the embodiments of the present specification, the normality of the commodity access function can be verified by verifying whether the order status information after placing an order is correct. Specifically, if the order status information indicates that the order is in a paid state, it indicates that the commodity ordering function verification has passed, and then the commodity production function of the material system can be further verified.
[0064] In the material system, after an order is pushed to the paid state, a production task corresponding to the order will be issued. The production task needs to prepare production materials according to the code material configuration data, that is, synthesize the code material image and generate a link to the code material image, which is used to send to the manufacturer to produce the code material goods.
[0065] In the embodiments of the present specification, after the order is advanced to the paid state, it is possible to check whether the material system has successfully prepared the production materials for sending to the manufacturer to perform production, so as to verify whether the commodity production function of the material system is normal. Specifically, if the production materials corresponding to the order can be obtained, it indicates that the commodity production function of the material system is normal.
[0066] Step 208: If the production data is consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
[0067] In the embodiments of this specification, in order to verify whether the use function of the goods produced by the material system is normal, the production data used to perform the production task can be used for verification. Specifically, the relevant information of the coded material can be obtained based on the production data, and it can be compared with the coded material configuration data of the material system. If the comparison is consistent, it indicates that the use function verification of the goods produced by the material system has passed.
[0068] Through the process from step 202 to step 208, the verification of the commodity access function, commodity ordering function, commodity production function and commodity use of the material system is completed in sequence. When all the verifications are passed, it can be determined that the functional verification of the material system has passed.
[0069] It should be understood that in the methods described in one or more embodiments of this specification, the order of some steps can be adjusted according to actual needs, or some steps can be omitted.
[0070] Figure 2 The method in the paper previews the entire process from commodity access, commodity ordering, commodity production to commodity use based on the material system to verify whether the material system has the problem of being unable to provide the expected functions for the code material demand users. The verification is realized before the material system is put into the actual production environment. It can effectively, efficiently and relatively low-cost identify the abnormal problems of the functional correctness of the material system.
[0071] based on Figure 2 The method, the embodiments of this specification also provide some specific implementation methods of the method, which are described below.
[0072] In the actual production scenario of the material system, after receiving a product access request, the material system will first call the user attribute inquiry interface (also known as the crowd interface) to determine whether the current user is within the target population of the current product.
[0073] In the preview verification scenario of the embodiment of this specification, in order to verify whether the commodity access module is normal in the two cases where the user belongs to the target population of the commodity and the user does not belong to the target population of the commodity, the injection capability of the simulation platform can be called in advance, and a script can be written to implement the mock injection of the user attribute consultation interface. Specifically, by implementing the mock injection of the user attribute consultation interface, the return value of the user attribute consultation interface can be tampered with, for example, true can be returned for the consultation of the specified user ID, and false can be returned for the consultation of the other user IDs.
[0074] Afterwards, when the user attribute consultation interface returns true, the product details information can be further obtained and the product details information can be returned as the interface call result of the product access request; when the user attribute consultation interface returns false, the product unsaleable information can be generated and the product unsaleable information can be returned as the interface call result of the product access request.
[0075] In one or more embodiments of the present specification, sending a commodity access request to the material system and obtaining an access result as described in step 202 may specifically include: in response to a change in the code material configuration data of the material system, calling the commodity access interface of the material system with the constructed user identifier and commodity identifier as input parameters; then receiving the access result returned by the commodity access interface; the access result is determined by the material system based on the user group attribute corresponding to the user identifier; the user group attribute includes a first attribute or a second attribute; the first attribute indicates that the user represented by the user identifier belongs to the target population corresponding to the commodity identifier; the second attribute indicates that the user represented by the user identifier does not belong to the target population corresponding to the commodity identifier.
[0076] Among them, the user group attribute can be determined by the material system by calling the user attribute consultation interface; the user attribute consultation interface is injected through mock, and is used to return true for consultations for the specified user ID, and return false for consultations other than the specified user ID. In specific applications, in order to verify whether the commodity access function of the material system is normal when the user belongs to the target population of the commodity, the user ID can be constructed as the specified user ID; and in order to verify whether the commodity access function of the material system is normal when the user does not belong to the target population of the commodity, the user ID can be constructed as an ID other than the specified user ID.
[0077] Optionally, after receiving the access result returned by the product access interface, it can include: verifying whether the user group attribute is the first attribute and the access result includes the product details information corresponding to the product identifier (that is, when the user group attribute is the first attribute, verifying whether the access result includes the product details information corresponding to the product identifier) to obtain a first verification result.
[0078] If the first verification result is yes, that is, when the user group attribute is the first attribute, if the access result includes the product detail information corresponding to the product identifier, it indicates that the current verification of the product access function has passed, and subsequent verification of product ordering, production and use can continue.
[0079] Optionally, after receiving the access result returned by the commodity access interface, it may also include: verifying whether the user group attribute is the second attribute and the access result includes the commodity unsaleable information corresponding to the commodity identifier (that is, when the user group attribute is the second attribute, verifying whether the access result includes the commodity unsaleable information corresponding to the commodity identifier), to obtain a second verification result.
[0080] If the second verification result is yes, that is, when the user group attribute is the second attribute, if the access result includes the information that the product corresponding to the product identifier is not available for sale, it indicates that the current verification of the product access function has passed. In this case, since the current user does not belong to the target group, subsequent verification of the order, production and use of the product will not be continued.
[0081] If at least one of the first verification result or the second verification result is no (that is, when the user group attribute is the first attribute, the access result does not include the product details information corresponding to the product identifier; or, when the user group attribute is the second attribute, the access result includes the product details information corresponding to the product identifier), it can be determined that the product access function of the material system after the code material configuration data is updated is abnormal, and it is determined that the material system verification has failed.
[0082] Figure 3 A schematic diagram of the process of accessing pre-coded material commodities provided in an embodiment of this specification is shown.
[0083] exist Figure 3 In step 301: construct the input parameters of the product inquiry interface, which may specifically include a user ID and a product ID.
[0084] Step 302: Call the product consultation interface to obtain the consultation result returned by the product consultation structure. Specifically, when consulting a product, first call the crowd interface to determine whether the current user is in the access crowd for the current product. In order to rehearse the two situations of being in the crowd and not being in the crowd, you can call the simulation platform injection capability and write a JAVA script to implement the mock injection of a specific interface. In this module, you can inject the crowd interface and tamper with the return value so that it can return true for the specified purchaser ID and false for the remaining purchaser IDs.
[0085] Step 303: Verify based on the consultation result. When not in the crowd, verify whether the product consultation interface returns the product unsaleable information, if yes, the verification passes as expected; when in the crowd, verify whether the product consultation interface returns the product details information, if yes, the verification passes as expected.
[0086] Based on the solution of the above embodiment, by injecting a mock into the user attribute consultation interface, it is possible to preview the situation where the current user belongs to the target population of the current product and the product access process when the current user does not belong to the target population of the current product. This can effectively and comprehensively identify the functional correctness issues of the material system in terms of product access.
[0087] In the actual production scenario of the material system, after a real user provides a product order request on the product browsing page, the material system will call the order interface to create an order. After the order is successfully created, the cashier will be pulled up, and after receiving the message from the cashier system that the order has been successfully paid, the order status will be updated to the paid status; if the user fails to pay successfully within the preset time, the order will be set to the canceled status.
[0088] In the preview verification scenario of the embodiment of this specification, after the order is successfully created, a message of successful cashiering of the material order issued by the cashier system can be simulated and constructed. After the material system monitors the message of successful cashiering of the material order, the order status is advanced to the paid status.
[0089] In one or more embodiments of the present specification, sending a commodity order request to the material system in step 204 may specifically include: first, calling the order interface of the material system to create an order with the user ID and the commodity ID as input parameters; then, sending a simulated checkout success message of the order to the material system, wherein the checkout success message is used to enable the material system to change the order status information of the order to a paid status; and thereafter, querying the order status information of the order in the material system.
[0090] During the preview, since it is not possible to pay from the interface, the embodiment of the present application simulates the process of successful user payment by simulating a message sent by the cashier system to the material system indicating that the material order has been successfully paid. Specifically, after the material system successfully creates an order, it receives the order ID returned by the order placement interface; then sends a simulated cashier success message corresponding to the order ID to the material system; after the material system monitors the cashier success message, it changes the order status information to the paid status.
[0091] Optionally, after obtaining the order status information, it is possible to verify whether the order status information indicates that the order is in a paid state, and obtain a third verification result. If the third verification result is yes (i.e., if the order status information indicates that the order is in a paid state), other verification processes can be continued, for example, further verifying from other angles whether the commodity order placement function of the material system is normal, further verifying whether the commodity production function of the material system is normal, etc.
[0092] In one or more embodiments of the present specification, the code material configuration data may include user tag configuration data; the user tag configuration data is used to indicate that a specified tag is set for the user corresponding to the user identifier after the order is paid. In this case, after the order is successfully cashed, the material system will mark the user corresponding to the order with a tag indicating that the order is successfully placed, so that relevant services can be provided to the user based on the tag in the extended business scenario.
[0093] Therefore, after the execution subject of this specification sends the simulated constructed order cashier success message to the material system, it can also include: querying the specified tag information of the user corresponding to the user identifier in the material system; then, verifying whether the specified tag information of the user corresponding to the user identifier is queried to obtain a fourth verification result. If the fourth verification result is yes (that is, if the specified tag information of the user corresponding to the user identifier is queried), other verification processes can be continued, for example, further verifying whether the commodity ordering function of the material system is normal from other angles, further verifying whether the commodity production function of the material system is normal, etc.
[0094] In specific applications, optionally, if both the third verification result and the fourth verification result are yes, that is, the order status information indicates that the order is in a paid state and the specified tag information of the user corresponding to the user identifier is queried, then a subsequent verification process can be executed, that is, further verifying whether the commodity production function of the material system is normal. If at least one of the third verification result or the fourth verification result is no, it indicates that the commodity ordering function of the material system is abnormal, and it is determined that the material system verification has not passed, and the current verification process can be ended.
[0095] In addition, in specific applications, sometimes the inventory quantity limit of the goods is set in the code material configuration data. In this case, considering the high concurrency of access, the material system will lock the qualification after receiving the call of the order interface, and deduct the inventory after listening to the order checkout success message. If the checkout success message is not heard within the preset time, the locked qualification will be released, thereby avoiding the situation of over-issuance of quotas and repeated enjoyment of activities by enthusiasts. In the embodiments of this specification, it is optional to identify whether the relevant functions are executed normally by previewing multiple visits by enthusiasts.
[0096] Figure 4 A schematic diagram of the process of purchasing pre-coded material commodities provided in an embodiment of this specification is shown.
[0097] exist Figure 4 In step 401: construct input parameters of the order placement interface, specifically, it may include user identification and product identification, etc.
[0098] Step 402: Call the order interface, which will create an order and obtain the corresponding order number. For example, the initial state of the order may be CREATE. Optionally, if the activity qualification restriction function is configured in the code material configuration data, the order interface will also perform the qualification locking operation.
[0099] Step 403: Simulate and construct a cashier system message that the cashier system has successfully cashed out the material order. When the material system monitors this message, it will determine the activity eligibility, deduct inventory, place production tasks, and advance the order status to the paid status.
[0100] Step 404: Verification. Specifically, the order can be queried and the order status can be verified to see if it has been paid. If it has been paid, the verification is passed. Otherwise, the order preview of the product fails. Optionally, if the code material configuration data is also configured with an order success ngfe tag, in step 404, the tag query interface will also be called to verify whether the purchaser has marked the configured ngfe tag.
[0101] Based on the scheme of the above embodiment, the process of placing an order for goods is rehearsed. After calling the order interface, a simulated cashier success message can be sent to the material system to verify whether the material system can normally advance the order status to the paid status, thereby determining whether the commodity ordering function of the material system is normal. In addition, when the code material configuration data is configured to tag the purchaser of the commodity, after sending the simulated cashier success message, it can also be verified whether the corresponding tag has been tagged for the user corresponding to the order, thereby determining whether the function of the commodity ordering module of the material system is normal.
[0102] In the actual production environment of the material system, after the order payment is successful, the material system will issue a material production task. The material production task will generate a coded material image according to the coded material configuration data, and send the link of the coded material image as production information to the manufacturer, so that the manufacturer can produce coded material products according to the production information.
[0103] In the preview verification scenario of the embodiment of this specification, when the order is found to be in the paid state, an asynchronous listening task can be issued. The asynchronous listening task can be used to periodically query the preparation status of the production materials corresponding to the order. In specific applications, if the production materials are found to have been prepared within the preset maximum number of queries, the verification passes, otherwise, the verification fails.
[0104] In one or more embodiments of the present specification, the obtaining of the production data used to execute the production task corresponding to the order may specifically include: querying the preparation status information of the production data used to execute the production task corresponding to the order; if the preparation status information indicates that the preparation has been completed, then obtaining the production data. If the production data is obtained, it can be indicated that the commodity production function of the material system is normal and the verification of the current stage has passed.
[0105] Optionally, after querying the preparation status information of the production materials for executing the production task corresponding to the order, it may also include: if the preparation status information indicates that the preparation is not completed, determining whether the number of times the query has been executed exceeds a preset maximum number of executions; if it does not exceed the maximum number of executions, querying the execution status information of the production task again after a preset time period; if it exceeds the maximum number of executions, generating a fifth verification result indicating that the verification has not passed.
[0106] Figure 5 and Figure 6 The schematic diagram of the process of producing pre-coded material commodities provided in the embodiment of this specification is shown, wherein: Figure 5 The figure shows the process of issuing asynchronous listening tasks for querying the status of commodity production tasks. Figure 6 The execution flow of the asynchronous monitoring task for querying the commodity production task status is shown.
[0107] exist Figure 5 In step 501: query the status of the order;
[0108] Step 502: Determine whether the order status is paid;
[0109] Step 503: If the order status is paid, an asynchronous monitoring task for querying the commodity production task status is issued.
[0110] exist Figure 6In step 601, when the asynchronous monitoring task is executed, the production task status will be queried first;
[0111] Step 602: According to the production task status, determine whether the production data (i.e., the link of the code material image corresponding to the order) has been prepared. If so, execute step 603; otherwise, execute step 604;
[0112] Step 603: Check the production data corresponding to the order (i.e., the link of the code material image corresponding to the order), and then perform the verification step 605;
[0113] Step 604: Determine whether the maximum number of executions is exceeded. If not, wait for the next trigger and execute step 601; if yes, end the loop and execute verification step 605.
[0114] Step 605: Determine whether the production materials corresponding to the order have been obtained. If so, the verification passes; otherwise, the verification fails.
[0115] Based on the solution of the above embodiment, by setting a monitoring task after confirming that the order has been paid successfully, it is possible to monitor whether the material system has successfully prepared the means of production for producing the goods. If the material system has successfully prepared the means of production, it is considered that the commodity production function of the material system is normal; on the contrary, if the material system has not successfully prepared the means of production after multiple queries, it is considered that the commodity production function of the material system is abnormal.
[0116] In the actual production environment of the material system, after the coded material products are produced, the coded materials will be actually used by the users.
[0117] In the preview verification scenario of the embodiment of this specification, the user can be simulated to use the code material to verify whether the code material is correct. Specifically, the static elements and dynamic elements of the code material can be verified based on the production materials used to produce the code material commodity.
[0118] In one or more embodiments of the present specification, the production data includes a link to a code material image, and the code material image is an image generated by the material system based on the code material configuration data when the order has been paid. In step 208, if the production data is consistent with the code material configuration data of the commodity, it is determined that the material system has passed the verification, which may specifically include: obtaining the code material image according to the production data; parsing the code value corresponding to the identification code in the code material image; based on the code value, determining whether the identification code is consistent with the material configuration data; if the identification code is consistent with the material configuration data, it is determined that the material system has passed the verification.
[0119] Optionally, judging whether the identification code is consistent with the material configuration data based on the code value may include: first, identifying the code type information corresponding to the identification code in the code material image based on the code value; then, verifying whether the code type information is consistent with the preset code type information in the code material configuration data, and obtaining a sixth verification result. If the sixth verification result is yes, the current verification passes; if the sixth verification result is no, the current verification fails, and the functional verification of the material system fails.
[0120] In specific applications, the identification of the code type information corresponding to the identification code in the code material image based on the code value may include: calling the Tongma platform interface with the code value as an input parameter; obtaining the code type information corresponding to the identification code returned by the Tongma platform interface; the code type information specifically includes the first code type information and the second code type information; the first code type information is used to describe the resource transfer type of the identification code; the second code type information is used to describe the applicable business type of the identification code. Then, correspondingly, the verification of whether the code type information is consistent with the preset code type information in the code material configuration data to obtain the sixth verification result may specifically include: verifying whether the first code type information is consistent with the preset first code type information in the code material configuration data and the second code type information is consistent with the preset second code type information in the code material configuration data to obtain the sixth verification result.
[0121] For example, the first code type information can be used to indicate that the identification code is a red envelope code, a payment code, etc. For another example, the second code type information can be used to indicate that the identification code is applicable to rental business, supermarket business, etc. Optionally, in a specific application, the code type information may specifically include at least one of the first code type information and the second code type information, for example, it may only include the first code type information; then correspondingly, the verification of whether the code type information is consistent with the preset code type information in the code material configuration data may specifically include verifying whether the first code type information is consistent with the preset first code type information in the code material configuration data, or verifying whether the second code type information is consistent with the preset second code type information in the code material configuration data.
[0122] Based on the above embodiment, accordingly, if the identification code is consistent with the material configuration data, it is determined that the material system verification has passed, which specifically means that if the sixth verification result is yes, that is, if the code type information is consistent with the code type information in the code material configuration data of the material system, it indicates that the static verification of the identification code has passed. In this case, a dynamic verification of the identification code can be further performed, that is, it can be further verified whether it is possible to jump to the correct page based on the identification code.
[0123] Optionally, judging whether the identification code is consistent with the material configuration data based on the code value may further include: if the sixth verification result is yes, verifying whether the page indicated by the identification code is consistent with the preset page configured in the material configuration data, to obtain a seventh verification result. Correspondingly, if the seventh verification result is yes, it is determined that the material system verification has passed.
[0124] In specific application, the verification of whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data to obtain the seventh verification result specifically includes: using the production materials and the preset automation use case as input parameters, calling the automation platform interface to trigger the execution of the automation use case; the operation indicated by the automation use case includes: scanning the code material image to jump to the page indicated by the identification code in the code material image, and verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data; then obtaining the seventh verification result returned by the automation platform interface. Among them, the seventh verification result is used to indicate whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data.
[0125] Optionally, the verifying whether the page indicated by the identification code is consistent with a preset page configured in the code material configuration data may specifically include: verifying whether the page indicated by the identification code complies with a general page setting in the code material configuration data.
[0126] The page general settings may be a detection that needs to be performed for any type of identification code, or in other words, the page general settings may be a condition that any type of identification code needs to meet. In specific applications, the detection of the page general settings may specifically include black and white screen detection, vacancy ratio detection, network anomaly detection, JS anomaly detection, etc.
[0127] Optionally, the verification of whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data may specifically include: according to the determined code type of the identification code, executing at least one verification item corresponding to the determined code type; the verification item is used to verify whether the page indicated by the identification code contains page text information corresponding to the determined code type.
[0128] For example, if the code type has been determined to be a "personalized code for collecting money", the corresponding verification items may include verifying whether the page indicated by the identification code contains text such as "payment". For another example, if the code type has been determined to be a "blank code for collecting money", the corresponding verification items may include verifying whether the page indicated by the identification code contains text such as "agree to the agreement and activate". For another example, if the code type has been determined to be a "personalized code for red envelope", the corresponding verification items may include verifying whether the page indicated by the identification code contains text such as "reward". For another example, if the code type has been determined to be a "blank code for red envelope", the corresponding verification items may include verifying whether the page indicated by the identification code contains text such as "red envelope". What is given here is only an example. In specific applications, the verification items of each type of identification code can be set according to the actual material configuration data.
[0129] Figure 7 A schematic diagram of the process of using pre-coded material commodities provided in an embodiment of this specification is shown.
[0130] exist Figure 7 In step 701: parsing the image element. Specifically, the method of the existing QR code / barcode processing package can be called to parse the code value of the QR code of the image element to obtain a string of characters.
[0131] Step 702: Static verification of image elements. Specifically, the QR code value obtained in step 701 can be used as an input parameter to call the Tongma platform interface to obtain the secondary code type information and primary code type information corresponding to this code value. Then, the analyzed code type information is compared with the code type field in the configuration. If the two are consistent, it means that the verification is passed, otherwise the verification fails.
[0132] Step 703: Dynamic verification of image elements. Specifically, the image link and the automated use case ID can be used as input parameters to call the UI automation platform interface to trigger the use case execution. The automated use case is a use case execution script written in advance, which is used to scan the image corresponding to the scanned code image link, and then verify whether the page after the jump is the expected page. In specific applications, different verifications can be performed according to different code types.
[0133] Based on the scheme of the above embodiment, the production data used to execute the production task (i.e., the link of the code material image) can be obtained to parse the image elements of the code material image, and then on the one hand, static verification of the image elements can be performed, that is, the code value obtained by the analysis is used as an input parameter to call the Tongma platform interface, identify the code type of the identification code in the code material image and perform verification; on the other hand, dynamic verification of the image elements can be performed, that is, the link of the code material image and the automation use case are used as input parameters to call the UI automation platform interface, identify the page indicated by the identification code in the code material image and perform verification. Therefore, for the verification of the produced goods, there is no need to use the actual produced goods, which reduces the verification cost and is efficient.
[0134] In the embodiments of the present specification, since the verification of the commodity access function, the commodity ordering function, the commodity production function, and the commodity usage function are implemented in sequence, after each function verification is passed, the functionality of the material system is considered to be normal; if at least one of the functions fails to pass the verification, the functionality of the material system is considered to be abnormal.
[0135] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.
[0136] The identification of abnormal configuration of code material data of the material system is a complex problem. If only static identification of abnormal configuration data is performed, all problems cannot usually be found, for example, whether users can purchase code material products normally, whether the page jumped to after scanning the code material is normal, etc. Based on one or more embodiments of the present specification, a preview verification method for code material configuration data of the material system is proposed, which can effectively identify abnormalities in code material configuration data, avoid functional correctness problems in the material system put into actual production, and avoid adverse consequences such as asset loss and customer complaints in advance.
[0137] Compared to the manual verification method in the prior art in which after the material system is put into actual production, an order is manually placed and actual production is carried out, and then the produced coded materials are verified to see if there are any problems (if there are any problems, the verification is manually repeated), the verification method provided by one or more embodiments of the present specification rehearses the entire process from product access to production during the configuration stage, which is efficient and cost-saving.
[0138] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0139] Figure 8 The embodiments of this specification provide corresponding to Figure 2 A schematic structural diagram of a device for verifying a material system.
[0140] In specific applications, the device runs in a simulation environment, and the configuration data of the simulation environment is consistent with the operating environment of the material system.
[0141] like Figure 8 As shown, the device may include:
[0142] The access function verification module 802 is used to send a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier;
[0143] The order function verification module 804 is used to send a commodity order request to the material system if the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes the commodity detail information corresponding to the commodity identifier, and obtain the order status information of the order created by the material system in response to the commodity order request;
[0144] The production function verification module 806 is used to obtain production data for executing the production task corresponding to the order if the order status information indicates that the order is in a paid state;
[0145] The function verification module 808 is used to determine that the material system verification has passed if the production data is consistent with the code material configuration data of the commodity.
[0146] based on Figure 8 The present specification also provides some specific implementation schemes of the method, which are described below.
[0147] Optionally, the access function verification module 802 can be specifically used to: in response to a change in the code material configuration data of the material system, call the commodity access interface of the material system with the constructed user identifier and commodity identifier as input parameters; receive the access result returned by the commodity access interface; the access result is determined by the material system based on the user group attribute corresponding to the user identifier; the user group attribute includes a first attribute or a second attribute; the first attribute indicates that the user represented by the user identifier belongs to the target population corresponding to the commodity identifier; the second attribute indicates that the user represented by the user identifier does not belong to the target population corresponding to the commodity identifier. The device for verifying the material system can also be used to: before sending a commodity order request to the material system, verify whether the user group attribute is the first attribute and the access result includes the commodity detail information corresponding to the commodity identifier, to obtain a first verification result.
[0148] After receiving the access result returned by the commodity access interface, the method may further include: verifying whether the user group attribute is a second attribute and the access result includes commodity unsaleable information corresponding to the commodity identifier, to obtain a second verification result.
[0149] If at least one of the first verification result or the second verification result is negative, it is determined that the material system verification has failed.
[0150] Optionally, the order function verification module 804 can be specifically used to: use the user ID and the product ID as input parameters to call the order interface of the material system to create an order; send a checkout success message of the simulated order to the material system; the checkout success message is used to enable the material system to change the order status information of the order to a paid status; query the order status information of the order in the material system. The device for verifying the material system can also be used to: before obtaining the production materials for executing the production task corresponding to the order, verify whether the order status information indicates that the order is in a paid status, and obtain a third verification result.
[0151] Optionally, the code material configuration data includes user label configuration data; the user label configuration data is used to indicate that a designated label is set for the user corresponding to the user identifier after the order is paid. After the cashier success message of the simulated constructed order is sent to the material system, the designated label information of the user corresponding to the user identifier in the material system can also be queried. Accordingly, the device for verifying the material system can also be used to: before obtaining the production data for executing the production task corresponding to the order, verify whether the designated label information of the user corresponding to the user identifier is queried to obtain a fourth verification result.
[0152] Optionally, the verifying whether the order status information indicates that the order is in a paid state, after obtaining a third verification result, may further include: if at least one of the third verification result or the fourth verification result is no, determining that the material system verification has failed.
[0153] Optionally, the production function verification module 806 can be specifically used to: query the preparation status information of the production materials used to execute the production task corresponding to the order; if the preparation status information indicates that the preparation has been completed, obtain the production materials.
[0154] In addition, the production function verification module 806 can also be specifically used for: if the preparation status information indicates that the preparation is not completed, then determine whether the number of times the query has been executed exceeds the preset maximum number of executions; if it does not exceed the maximum number of executions, then query the execution status information of the production task again after a preset time period; if it exceeds the maximum number of executions, then generate a fifth verification result indicating that the verification failed.
[0155] Optionally, the production data includes a link to a code material image, and the code material image is an image generated based on the code material configuration data; the usage function verification module 808 can be specifically used to: obtain the code material image based on the production data; parse the code value corresponding to the identification code in the code material image; based on the code value, determine whether the identification code is consistent with the material configuration data; if the identification code is consistent with the material configuration data, determine that the material system verification has passed.
[0156] Among them, judging whether the identification code is consistent with the material configuration data based on the code value can specifically include: identifying the code type information corresponding to the identification code in the code material image based on the code value; verifying whether the code type information is consistent with the preset code type information in the code material configuration data, and obtaining a sixth verification result.
[0157] Wherein, based on the code value, identifying the code type information corresponding to the identification code in the code material image may specifically include: using the code value as an input parameter, calling the Tongma platform interface; obtaining the code type information corresponding to the identification code returned by the Tongma platform interface; the code type information specifically includes first code type information and second code type information; the first code type information is used to describe the resource transfer type of the identification code; the second code type information is used to describe the applicable business type of the identification code. Accordingly, verifying whether the code type information is consistent with the preset code type information in the code material configuration data to obtain the sixth verification result may specifically include: verifying whether the first code type information is consistent with the preset first code type information in the code material configuration data and the second code type information is consistent with the preset second code type information in the code material configuration data to obtain the sixth verification result.
[0158] Wherein, judging whether the identification code is consistent with the material configuration data based on the code value may further include: if the sixth verification result is yes, verifying whether the page indicated by the identification code is consistent with the preset page configured in the material configuration data, and obtaining a seventh verification result. If the identification code is consistent with the material configuration data, determining that the material system verification has passed may further include: if the seventh verification result is yes, determining that the material system verification has passed.
[0159] Among them, the verification of whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data to obtain the seventh verification result can specifically include: taking the production materials and the preset automation use case as input parameters, calling the automation platform interface to trigger the execution of the automation use case; the operations indicated by the automation use case include: scanning the code material image to jump to the page indicated by the identification code in the code material image, and verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data; obtaining the seventh verification result returned by the automation platform interface.
[0160] The verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data may specifically include: verifying whether the page indicated by the identification code conforms to the general page settings in the code material configuration data.
[0161] Among them, the verification of whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data can specifically include: according to the determined code type of the identification code, executing at least one verification item corresponding to the determined code type; the verification item is used to verify whether the page indicated by the identification code contains page text information corresponding to the determined code type.
[0162] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.
[0163] The above is a schematic scheme of a device for verifying a material system of this embodiment. It should be noted that the technical scheme of the device for verifying a material system and the technical scheme of the method for verifying a material system are of the same concept, and the details of the technical scheme of the device for verifying a material system that are not described in detail can be referred to the description of the technical scheme of the method for verifying a material system.
[0164] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0165] Fig. 9 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a device for calibrating a material system.
[0166] like Fig. 9 As shown, the device 900 may include:
[0167] at least one processor 910; and,
[0168] A memory 930 in communication with the at least one processor; wherein,
[0169] The memory 930 stores instructions 920 that can be executed by the at least one processor 910. The instructions are executed by the at least one processor 910 to enable the at least one processor 910 to:
[0170] Sending a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier;
[0171] If the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, a commodity order request is sent to the material system to obtain order status information of an order created by the material system in response to the commodity order request;
[0172] If the order status information indicates that the order is in a paid state, obtaining production data for executing the production task corresponding to the order;
[0173] If the production materials are consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
[0174] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The devices and equipment provided in the embodiments of this specification correspond to the methods, so the devices and equipment also have beneficial technical effects similar to the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the corresponding devices and equipment will not be repeated here.
[0175] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0176] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0177] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0178] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0179] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0180] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0182] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0183] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0184] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0185] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0186] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0187] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0188] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0189] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A method for verifying a material system, the method being run in a simulation environment, wherein the configuration data of the simulation environment is consistent with the configuration data of the running environment of the material system; the method comprising: Sending a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; The commodity access request carries a constructed user identifier and commodity identifier; If the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, a commodity order request is sent to the material system to obtain order status information of an order created by the material system in response to the commodity order request; If the order status information indicates that the order is in a paid state, obtaining production data for executing the production task corresponding to the order; If the production materials are consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
2. The method of claim 1, wherein: The sending of a commodity access request to the material system to obtain an access result specifically includes: In response to a change in the code material configuration data of the material system, calling the commodity access interface of the material system with the constructed user identification and commodity identification as input parameters; Receive an access result returned by the commodity access interface; the access result is determined by the material system based on a user group attribute corresponding to the user identifier; the user group attribute includes a first attribute or a second attribute; the first attribute indicates that the user represented by the user identifier belongs to the target population corresponding to the commodity identifier; the second attribute indicates that the user represented by the user identifier does not belong to the target population corresponding to the commodity identifier; Before sending the commodity order request to the material system, the method further includes: It is verified whether the user group attribute is the first attribute and the access result includes the commodity detail information corresponding to the commodity identifier, to obtain a first verification result.
3. The method of claim 2, wherein: After receiving the access result returned by the commodity access interface, the method further includes: It is verified whether the user group attribute is the second attribute and the access result includes information that the commodity corresponding to the commodity identifier is not available for sale, to obtain a second verification result.
4. The method of claim 3, wherein if at least one of the first verification result or the second verification result is negative, it is determined that the material system verification has failed.
5. The method of claim 1, wherein: The sending of a commodity order request to the material system specifically includes: Using the user ID and the product ID as input parameters, calling the order placement interface of the material system to create an order; Sending a simulated checkout success message of the order to the material system; the checkout success message is used to enable the material system to change the order status information of the order to a paid status; Query the order status information of the order in the material system; Before obtaining the production data for executing the production task corresponding to the order, the method further includes: Verify whether the order status information indicates that the order is in a paid state, and obtain a third verification result.
6. The method of claim 5, wherein: The code material configuration data includes user label configuration data; the user label configuration data is used to indicate that a designated label is set for the user corresponding to the user identifier after the order is paid; After sending the cashier success message of the simulated order to the material system, the method further includes: Query the specified tag information of the user corresponding to the user identifier in the material system; Before obtaining the production data for executing the production task corresponding to the order, the method further includes: Verify whether the specified tag information of the user corresponding to the user identifier is found, and obtain a fourth verification result.
7. The method of claim 6, wherein: After verifying whether the order status information indicates that the order is in a paid state and obtaining a third verification result, the method further includes: If at least one of the third verification result or the fourth verification result is negative, it is determined that the material system verification has failed.
8. The method of claim 1, wherein: The obtaining of production data for executing the production task corresponding to the order specifically includes: Querying the preparation status information of the production materials used to execute the production task corresponding to the order; If the preparation status information indicates that the preparation has been completed, the production data is obtained.
9. The method of claim 8, wherein: After querying the preparation status information of the production materials used to execute the production task corresponding to the order, the method further includes: If the preparation status information indicates that the preparation is not completed, determining whether the number of times the query has been executed exceeds a preset maximum number of executions; If the maximum number of executions is not exceeded, the execution status information of the production task is queried again after a preset time.
10. The method of claim 9, wherein: After determining whether the number of query executions exceeds the preset maximum number of executions, the method further includes: If the maximum number of executions is exceeded, a fifth verification result indicating that the verification has not passed is generated.
11. The method of claim 1, wherein: The production data includes a link to a code material image, and the code material image is an image generated based on the code material configuration data; if the production data is consistent with the code material configuration data of the commodity, then determining that the material system verification has passed specifically includes: According to the production data, obtaining the coded material image; Parsing the code value corresponding to the identification code in the code material image; Based on the code value, determining whether the identification code is consistent with the material configuration data; If the identification code is consistent with the material configuration data, it is determined that the material system verification has passed.
12. The method of claim 11, wherein: The determining, based on the code value, whether the identification code is consistent with the material configuration data specifically includes: Based on the code value, identifying code type information corresponding to the identification code in the code material image; Verify whether the code type information is consistent with the preset code type information in the code material configuration data to obtain a sixth verification result.
13. The method of claim 12, wherein: The identifying, based on the code value, code type information corresponding to the identification code in the code material image specifically includes: Using the code value as an input parameter, calling the Tongma platform interface; Obtaining code type information corresponding to the identification code returned by the communication code platform interface; the code type information specifically includes first code type information and second code type information; the first code type information is used to describe the resource transfer type of the identification code; the second code type information is used to describe the applicable service type of the identification code; The checking whether the code type information is consistent with the preset code type information in the code material configuration data to obtain a sixth verification result specifically includes: Verify whether the first code type information is consistent with the preset first code type information in the code material configuration data and the second code type information is consistent with the preset second code type information in the code material configuration data, and obtain a sixth verification result.
14. The method according to claim 12, wherein judging whether the identification code is consistent with the material configuration data based on the code value further comprises: If the sixth verification result is yes, then verify whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data to obtain a seventh verification result; If the identification code is consistent with the material configuration data, determining that the material system verification has passed specifically includes: If the seventh verification result is yes, it is determined that the material system verification has passed.
15. The method according to claim 14, wherein the step of verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data to obtain a seventh verification result specifically comprises: Using the production data and the preset automation use case as input parameters, calling the automation platform interface to trigger the execution of the automation use case; The operations performed by the automated use case indication include: scanning the code material image to jump to the page indicated by the identification code in the code material image, and verifying whether the page indicated by the identification code is consistent with a preset page configured in the code material configuration data; Obtain the seventh verification result returned by the automation platform interface.
16. The method according to claim 14, wherein the step of verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data comprises: Verify whether the page indicated by the identification code complies with the general settings of the page in the code material configuration data.
17. The method according to claim 14, wherein the step of verifying whether the page indicated by the identification code is consistent with the preset page configured in the code material configuration data comprises: According to the determined code type of the identification code, executing at least one check item corresponding to the determined code type; The verification item is used to verify whether the page indicated by the identification code contains page text information corresponding to the determined code type.
18. A device for verifying a material system, the device running in a simulation environment, the configuration data of the simulation environment being consistent with the operating environment of the material system; the device comprising: An access function verification module is used to send a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; The commodity access request carries a constructed user identifier and commodity identifier; An order function verification module, configured to send a commodity order request to the material system if the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, and obtain order status information of an order created by the material system in response to the commodity order request; A production function verification module, used for obtaining production data for executing the production task corresponding to the order if the order status information indicates that the order is in a paid state; A function verification module is used to determine that the material system verification has passed if the production data is consistent with the code material configuration data of the commodity.
19. A device for verifying a material system, running in a simulation environment, wherein the configuration data of the simulation environment is consistent with the configuration data of the running environment of the material system; the device comprises: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Sending a commodity access request to the material system to obtain an access result; the commodity includes one or more code materials; the commodity access request carries a constructed user identifier and a commodity identifier; If the user represented by the user identifier belongs to the target group corresponding to the commodity identifier and the access result includes commodity detail information corresponding to the commodity identifier, a commodity order request is sent to the material system to obtain order status information of an order created by the material system in response to the commodity order request; If the order status information indicates that the order is in a paid state, obtaining production data for executing the production task corresponding to the order; If the production materials are consistent with the code material configuration data of the commodity, it is determined that the material system verification has passed.
