Method, device, electronic device and product recommendation method for generating use cases
The method and device facilitate efficient generation of use cases and product recommendations by utilizing pre-generated feature value combinations, addressing the inefficiencies of manual use case creation and enhancing user experience.
Patent Information
- Application Number
- CN201910723302.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-06
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2039-08-06
AI Technical Summary
The manual generation of use cases by designers is lagging behind the increasing speed of system iteration and functional scenarios, necessitating a more efficient method for generating use cases.
A method and device for generating use cases by obtaining a recommended use case, identifying target features, and applying feature value combinations from a pre-generated pool to create a use case set with different feature values, and a similar approach for product recommendations.
This method improves the efficiency and accuracy of generating use cases and product recommendations by leveraging pre-generated feature value combinations, allowing users to expand use cases and enhance user experience.
Smart Images

Figure CN112346953B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of use case computer technology, and more specifically, to a method for generating use cases, a device for generating use cases, an electronic device, and a commodity recommendation method. Background Art
[0002] Use case is a technique used in software engineering or system engineering. It is a description of how a system responds to external requests. Each use case can provide one or more scenarios to illustrate how the system interacts with users or other systems, how the system operates, what goals are achieved, etc.
[0003] Use cases can be divided into requirement use cases and test cases, etc.
[0004] A test case is a set of test inputs, execution conditions, and expected results compiled for a test objective in order to test whether a program meets a certain requirement.
[0005] In the prior art, use cases are generally written manually by designers, which requires designers to fully understand and be familiar with the system for which the use cases are targeted. However, as the system iteration speed becomes faster and faster, the number of functional scenarios increases. This makes the method of manually designing and generating use cases by designers increasingly lagging behind actual needs. Therefore, it is necessary to provide a technical solution that can generate use cases more efficiently. Summary of the invention
[0006] An object of the present invention is to provide a new technical solution for generating use cases.
[0007] According to a first aspect of the present invention, a method for generating use cases is provided, comprising: obtaining a recommended use case; obtaining at least one feature in the recommended use case whose feature value needs to be changed as a target feature; obtaining a feature value combination corresponding to the target feature in a pre-generated feature value combination pool; based on the feature value combination corresponding to the target feature, changing the feature value of the corresponding target feature in the recommended use case, to obtain a use case set with the same structure as the recommended use case but different feature values of the target feature.
[0008] According to a second aspect of the present invention, there is provided a device for generating use cases, comprising: an acquisition module for acquiring recommended use cases, acquiring at least one feature in the recommended use cases whose feature value needs to be changed as a target feature, and acquiring a feature value combination corresponding to the target feature in a pre-generated feature value combination pool; and a obtaining module for changing the feature value of the corresponding target feature in the recommended use cases based on the feature value combination corresponding to the target feature, so as to obtain a use case set having the same structure as the recommended use case but different feature values of the target feature.
[0009] According to a third aspect of the present invention, there is provided an electronic device for a use case, comprising: a processor and a memory, wherein the memory stores executable instructions, and the executable instructions, when executed by the processor, implement a method according to any one of the embodiments of the present disclosure.
[0010] According to a third aspect of the present invention, a product recommendation method is provided, comprising: obtaining recommended products; obtaining at least one feature of the product whose feature value needs to be changed as a target feature; obtaining a feature value combination corresponding to the target feature in a pre-generated feature value combination pool; and based on the feature value combination corresponding to the target feature, changing the feature value of the corresponding target feature in the product, to obtain a product set with the same data structure as the product but different feature values of the target feature.
[0011] According to one embodiment of the present invention, since a use case set having the same structure as the recommended use case but different feature values of the target feature can be obtained based on the recommended use case and utilizing the feature pool, it can help users expand use cases and improve the efficiency of users generating use cases.
[0012] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0014] Figure 1 A schematic flow chart of a method according to an embodiment of the present disclosure is shown.
[0015] Figure 2 A schematic block diagram of a device according to an embodiment of the present disclosure is shown.
[0016] Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0017] Figure 4 A schematic diagram of a network to which the solution according to an embodiment of the present disclosure can be applied is shown.
[0018] Figure 5 An example according to one embodiment of the present disclosure is shown.
[0019] Figure 6 A schematic flowchart of an example for obtaining recommended use cases according to an embodiment of the present disclosure is shown.
[0020] Figure 7A schematic flowchart of an example of performing expansion processing on recommended use cases according to an embodiment of the present disclosure is shown.
[0021] Figure 8 A schematic flowchart of a commodity recommendation method according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0022] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0023] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0024] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0025] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0026] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0027] Hereinafter, various embodiments and examples according to the present invention are described with reference to the accompanying drawings.
[0028] <Method>
[0029] Figure 1 A schematic flowchart of a method for generating a use case according to an embodiment of the present disclosure is shown.
[0030] The operation of creating / generating use cases can be initiated by users, who can be program designers or testers. Figure 1 Shows the steps involved in the process of generating use cases.
[0031] In step S1100, a recommended use case is obtained.
[0032] In step S1200, at least one feature in the recommended use case whose feature value needs to be changed is obtained as a target feature.
[0033] In step S1300, a feature value combination corresponding to the target feature is obtained from a pre-generated feature value combination pool.
[0034] In step S1400, based on the feature value combination corresponding to the target feature, the feature value of the corresponding target feature in the recommended use case is changed to obtain a use case set with the same structure as the recommended use case but different feature values of the target feature.
[0035] The use case is preferably a test case.
[0036] Here, obtaining recommended use cases may include the following steps: receiving use case description information; obtaining features included in the recommended use case from the use case description information; obtaining a matching feature set of features included in the recommended use case from a pre-generated feature pool; obtaining use cases similar to the matching feature set from a use case database to form a use case recommendation list; and selecting a use case from the use case recommendation list as a recommended use case.
[0037] For example, feature extraction is performed on the use cases in the use case database, and after corpus analysis and vectorization, the feature pool is obtained; feature value combination training is performed on the use cases in the use case database to obtain a feature value combination pool.
[0038] Here, users only need to enter a small amount of information, and the system will be able to provide recommended use cases. This method can improve the efficiency of users generating use cases, thereby improving user work efficiency.
[0039] In addition, in this way, users can reuse the use cases that have already been stored in the system. This method can improve the efficiency and accuracy of finding use cases. In addition, this can also avoid the different efficiency and accuracy of finding use cases due to different users' familiarity with the use case database. In this case, it can save the time of new users to familiarize themselves with the use case database.
[0040] Here, the use case information may include at least one of description information, title, label, and attributes about the newly created use case.
[0041] In some cases, the use case information may be just a simple title or tag, etc. Therefore, the recommended use case may be directly obtained from the use case database based on the use case information.
[0042] In other cases, the use case information may be description information, or a combination of description information, title, tags, and attributes. Feature values may be extracted from the use case information; and recommended use cases may be obtained from a use case database based on the feature values. For example, the use case information may be segmented using a segmentation algorithm such as Jieba segmentation to extract keywords therein as feature values, such as titles, tags, attributes of the use case, etc.
[0043] Typically, multiple recommended use cases can be obtained. For example, by using a naive Bayes algorithm, the feature values of the matching feature set and the features in the feature pool are matched according to the condition of maximum similarity probability to obtain a use case recommendation list. The multiple recommended use cases can be presented to the user for selection.
[0044] The user can select one of the multiple recommended use cases as a seed use case. Using the seed use case, the use case can be expanded through "expansion" processing. For example, multiple seed features are extracted from the seed use case, and a combination operation is performed on the multiple seed features to form multiple combined features. Then, the multiple combined features are presented to the user for selection. The user can select the desired features from these combined features to generate a new use case. In this way, the operations required by the user are simplified, and the existing use case resources can be fully utilized, thereby improving work efficiency.
[0045] When there are more than two target features, based on the feature value combinations corresponding to the target features, the feature values of the corresponding target features in the recommended use cases are changed to obtain a use case set with the same structure as the recommended use case but with different feature values of the target features, including: cross-multiplying the feature values of different target features to achieve a feature value combination of the target features that satisfies the Cartesian product; using each feature combination, the feature values of the corresponding target features in the recommended use cases are changed to obtain a use case with the same structure as the recommended use case but with different feature values of the target features
[0046] The features in the feature value combination pool are classified and stored at least according to the value type of the feature value, and the value type includes enumeration, integer operation, and Boolean.
[0047] The various combinations of the plurality of seed features are also filtered to remove undesirable combinations. In this way, the interference caused to the user by illegal combinations when the user selects features can be reduced, and the possible operation failure caused by illegal combinations can also be avoided to a certain extent.
[0048] In one example, a user's selection of a combination of features may be received to generate a new use case, and the new use case may be stored in a use case database for subsequent use. In this way, the use cases newly created by the user may be accumulated to continuously enrich the use case database. In this way, the material in the use case database may continue to increase, thereby enabling the use case recommendation system to continuously evolve.
[0049] In another example, feature extraction can be performed regularly on the use cases in the use case database to obtain the features in the use cases in advance. In this case, when a new use case is generated, the pre-obtained features can be directly used as the seed features. In this way, the amount of processing when recommending use cases to users can be reduced, the processing speed during recommendation can be increased, and users can have a better user experience. On the other hand, since the real-time requirements of pre-processing are lower than those when users generate new use cases, larger-scale data processing can be performed in advance, thereby improving the accuracy of recommendations.
[0050] Similarly, the combination operation can also be performed regularly on the features of the use cases in the use case database to obtain the combination features of the features in advance. In this case, when a new use case is generated, the pre-obtained combination feature can be used as at least one of the multiple combination features. Similarly, this processing can reduce the amount of processing when recommending use cases to users, increase the processing speed when recommending, and give users a better user experience. Moreover, large-scale data processing can be performed in advance to improve the accuracy of recommendations.
[0051] <Device>
[0052] Figure 2 A schematic block diagram of a device 2000 for generating a use case according to an embodiment of the present disclosure is shown.
[0053] The device 2000 includes: a first acquisition module 2010, used to acquire recommended use cases; a second acquisition module 2020, used to acquire at least one feature in the recommended use cases whose feature value needs to be changed as a target feature; a third acquisition module 2030, used to acquire a feature value combination corresponding to the target feature in a pre-generated feature value combination pool; and an acquisition module 2040, which changes the feature value of the corresponding target feature in the recommended use cases based on the feature value combination corresponding to the target feature, and obtains a use case set with the same structure as the recommended use cases but different feature values of the target features.
[0054] The device 2000 can be used to implement the solutions in the above method embodiments. Therefore, the contents repeated above will not be described here.
[0055] In addition, the device 2000 may also include a processing module for executing other processing in the above-described solution, and the description of the processing will not be repeated here.
[0056] Those skilled in the art should understand that with the development of electronic technology, the boundaries between software and hardware are becoming less and less obvious. Technical solutions that can be implemented using software can also be implemented using hardware; except for some mechanical structure solutions, technical solutions that can be implemented using hardware can also be implemented using software. Technicians can choose whether to use software to implement a technical solution or to use hardware to implement the technical solution according to needs. Generally speaking, the requirements are non-technical factors, such as the price, quantity, market availability, etc. of the required devices. Therefore, the above modules can be implemented in various ways. For example, the above modules can be implemented by software, by dedicated hardware, or by a combination of the two. From the perspective of the functions to be implemented, these implementation methods are equivalent.
[0057] <Electronic equipment>
[0058] Figure 3 A schematic block diagram of an electronic device according to an embodiment of the present disclosure is shown.
[0059] The electronic device 3000 may be a computer, a laptop, a tablet computer, a server, etc.
[0060] like Figure 1 As shown, the electronic device 3000 includes a processor 3010, a memory 3020, a display screen 3040, a user interface 3050, a camera 3060, an audio / video interface 3070, a sensor 3080 and a communication component 3090. In the case where the electronic device 3000 needs to be powered by itself, it also includes a power management chip 3030 and a battery 3031.
[0061] The processor 3010 may be any of a variety of processors, for example, an ARM architecture processor, such as an application processor of Apple, a processor of Qualcomm, a processor of Huawei, etc.
[0062] The memory 3020 can store the underlying software, system software, application software, data, etc. required for the operation of the electronic device 3000. The memory 3020 can include various forms of memory, such as ROM, RAM, Flash, etc.
[0063] Display screen 3040 may be a liquid crystal display screen, an OLED display screen, etc. In one example, display screen 4040 may be a touch screen. A user may perform input operations through display screen 1102. In addition, a user may also perform fingerprint recognition through the touch screen.
[0064] The user interface 3050 may include a USB interface, a lightning interface, a keyboard, a touch screen, etc.
[0065] Camera 3060 can be a single camera or multiple cameras. In addition, camera 3060 can be used for user's face recognition.
[0066] The audio / video interface 3070 may include, for example, a speaker interface, a microphone interface, a video transmission interface such as HDMI, and the like.
[0067] The sensor 3080 may include, for example, a gyroscope, an accelerometer, a temperature sensor, a humidity sensor, a pressure sensor, and the like.
[0068] The communication component 3090 may include, for example, a WiFi communication component, a Bluetooth communication component, a 3G, 4G and 5G communication component, etc.
[0069] The power management chip 3030 is used to manage the battery 3031 to ensure greater utilization efficiency. The battery 3031 is, for example, a lithium-ion battery.
[0070] Figure 3 The electronic device shown is illustrative only and is in no way intended to limit the invention, its application, or uses.
[0071] The memory 3020 of the electronic device 3000 may store executable instructions. When the executable instructions are executed by the processor 3010, any method in the above-described embodiments is implemented. Since the specific contents of the embodiments have been described in detail above, these detailed descriptions will not be repeated here.
[0072] <Network Electronic Equipment>
[0073] Figure 4 A schematic diagram of a network to which the solution according to an embodiment of the present disclosure can be applied is shown.
[0074] like Figure 4 As shown, network 4100 may include servers 4200 , 4300 .
[0075] exist Figure 4In the embodiment, terminal devices 4400-1, 4400-2, and 4400-3 are connected to the network 4100 and communicate with servers 4200 and 4300 respectively. Terminal devices 4400-1, 4400-2, and 4400-3 are, for example, computers, laptops, smart phones, etc. Terminal devices 4400-1, 4400-2, and 4400-3 can work in conjunction with servers 4200 and 4300 in the network 4000 to implement the technical solutions in the embodiments disclosed herein. Here, the servers and terminal devices in the network can both use processors and memories, and the various features in the embodiments disclosed in the present invention can be distributed to the servers and terminal devices, thereby jointly implementing the solutions of the embodiments. From this aspect, they can be regarded as an electronic device as a whole. The memory of the electronic device can store executable instructions in a centralized or distributed manner, and the executable instructions can implement any method in the embodiments described above when executed by the processor in a centralized or distributed manner.
[0076] Each embodiment in this specification is described in a progressive manner, and the same or 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 electronic device 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.
[0077] <Example 1>
[0078] In traditional testing activities, when writing use cases, testers not only create use cases from scratch, but also look for similar use cases based on experience and then rewrite the use cases based on them. However, the use case database may contain thousands of use cases, and the process of finding use cases is often time-consuming and laborious.
[0079] With the solution here, in the case where a user, such as a tester, can write only a few requirements, the system can recommend appropriate use cases to the user. Figure 5 An example according to one embodiment of the present disclosure is shown.
[0080] Before generating new use cases, existing use cases can be preprocessed. Figure 5 As shown, the feature pool can be trained in the preprocessing P1. The processing system can perform feature extraction on all use cases in the use case database 5200 every day. The use cases can be subjected to corpus analysis and vectorization to obtain various feature models and / or sets. Figure 5As shown, the obtained feature set can be stored in a feature pool 5040. When recommending use cases to users, the feature set in the feature pool 5040 can be directly used to match the feature set input by the user to determine the recommended use cases. For example, the feature pool 5040 includes a text feature set 5041, a title feature set 5042, a tag feature set 5043, and the like.
[0081] In addition, feature value combination training can also be performed in preprocessing P2. The processing system can perform feature value combination training on all use cases every day to obtain an expanded feature value combination 5100. The combination 5100 can include, for example, an integer value combination 5101, an enumeration value combination 5102, an abnormal value combination 5103, a Boolean value combination 5104, a custom combination 5105, etc. The combination can be directly used when a user creates a new use case.
[0082] In addition, the user can also perform preprocessing P3 to input an empirical initial feature value combination. In this way, the existing experience of some users can be used to improve the performance of the recommendation processing system. For example, the tester can set the initial custom combination, illegal combination, etc. based on experience.
[0083] Below, refer to Figure 5 Describe an example of a user-generated use case.
[0084] In step S1, a user such as a tester starts to create a new use case and inputs use case information 5010. The use case information 5010 may include description information, title, tags, attributes, etc. about the new use case. The description information may be information describing the function, purpose, etc. of the use case.
[0085] In step S2, the processing system can extract features in real time based on the input information. Compared with a complete use case, the amount of the input information is small. A word segmentation algorithm such as the Jieba word segmentation algorithm can be used to obtain feature values from the input information. For example, a label can be used as a feature value. The extracted features form a feature set 5020 for matching. The matching feature set 5020 can be used as a parameter 5030 to obtain a matching use case from a feature pool 5040.
[0086] In step S3, for example, by using a naive Bayes algorithm, the matching feature set 5020 and the feature pool 5040 are matched according to the condition of maximum similarity probability, thereby obtaining N recommended use cases 5050 with the highest probability.
[0087] In step S4, for example, the user selects the first use case, such as Figure 5 The selected use case is shown as a solid circle in block 5050. The selected use case is used as a seed use case.
[0088] In step S5, feature values are extracted from the seed use case for use case expansion. The processing system extracts features from the seed use case and obtains a feature list of the seed use case. For example, an example of a feature value is: key1:value1||key2:value2.
[0089] In step S6, the feature value combination of the use case expansion is set. The features in the feature list can be combined according to the data type, for example, integer value combination, enumeration value combination, abnormal value combination, Boolean value combination, custom combination, etc. The feature value combination obtained in the preprocessing can be directly used here.
[0090] In step S7, use case explosion processing may be performed. The processing system may perform cross-product combinations of feature values to achieve a large number of combinations of Cartesian product levels. The processing system may filter out illegal feature combinations according to preset rules to remove meaningless and / or repeated use cases. Finally, an exploded use case 5080 for recommendation is obtained.
[0091] In step S8, the user selects some use cases from the recommended use cases 5080, for example, Figure 5 The use cases shown in black circles in 5080 , thereby generating a use case set 5090 .
[0092] Here, users only need to input a small amount of information to automatically get multiple use case recommendations and a large number of recommended features. This can improve the efficiency of users generating use cases. In addition, in this way, users can also easily construct a large number of use cases.
[0093] <Example 2>
[0094] Figure 6 A schematic flowchart of a specific example for obtaining recommended use cases according to an embodiment of the present disclosure is shown.
[0095] In the first step S01, the system extracts and associates features of all use cases in the use case database every day to update the feature pool. For example, the use case database contains 100 use cases, and the system extracts features from these use cases every day to obtain a set of 1,000 feature value pairs (key-value pairs). These 1,000 feature value pairs are associated with the 100 use cases to obtain a set of feature values associated with the use cases. This set is called a "feature pool". For example, in the feature pool, use case 1 is associated with 20 features such as "category": "women's clothing"; "label": "Tmall"; "ad space": "Guess you like".
[0096] In the second step S02, feature extraction is performed. When obtaining use case recommendations, the user can briefly enter some use case information in the front-end device, for example, the use case description is "The use case I want is 'Guess the ad slot you like', and the expected test is the women's clothing category"; the label is "Tmall"; the configuration parameters are multiple key-value pair combinations "key1": "value1", "key2": "value2".
[0097] After receiving the information input by the user, the system will perform word segmentation on the text information. For example, the above use case description is segmented into: 1. "Advertising position": "Guess you like"; 2. "Category": "Women's clothing", and the above two word segmentation results can be used as feature values. In addition, "label": "Tmall" and the configured key-value pairs can also be used as feature values. In this way, the set and sum of the feature values required by the user can be obtained. For example, in this example, 5 feature key-value pairs can be obtained as the features input by the user.
[0098] In the third step S03, a use case set is recommended to the user. The features input by the user will be matched in the feature pool according to the Naive Bayes algorithm. For example, the feature "category": "women's clothing" will be matched to the "category": "women's clothing" entry in the use case database (the similarity between the two is 100), "category": "girls" entry (the similarity between the two is 90), "category: men's clothing" (the similarity between the two is 20). Finally, for example, according to the above 5 feature key-value pairs, the highest similarity is matched to several entries (for example, the top 3 entries), and the use case set is recommended to the user.
[0099] <Example 3>
[0100] Figure 7 A schematic flowchart of a specific example of expanding features of a recommended use case according to an embodiment of the present disclosure is shown.
[0101] In the first step S11, the system performs feature combination training on the use case database every day to obtain a feature combination set. For example, the following feature combination set can be obtained:
[0102] 1. Enumeration type
[0103] a. Category [women's skirts, jeans, suits]
[0104] b. Advertisement position [Guess you like, homepage focus]
[0105] 2. Boolean type:
[0106] Function switch [true, false]
[0107] 3. Integer:
[0108] int8[-1, 0, 1] etc.
[0109] 4. Outlier combination:
[0110] a.Category [Abnormal Category 1, Abnormal Category 2]
[0111] b. Integer: int8[100000000000(very large exception)], etc.
[0112] By training the use case database, all combinations of feature values can be obtained.
[0113] In the second step S12, the user can perform feature expansion based on a use case. The use case can be a newly created use case and / or a recommended use case. This use case is called a seed use case.
[0114] Extract features from the seed use case. For example, you can extract three features from the seed use case: ad slot, category, and bid. Then, you can fill in the feature value combination for these three features. For example, the result of filling in is as follows:
[0115] For the "ad space" feature, you can fill in [Guess you like, homepage focus];
[0116] For the "Category" feature, you can enter the abnormal value combination: a. Category [Abnormal Category 1, Abnormal Category 2];
[0117] For the "bid" feature, you can fill in the integer combination int8[-1, 0, 1] and the exception combination int8[100000000000 (very large exception)].
[0118] Thus, three sets of features and values can be obtained: ad slot (2 values), category (4 values), bid (4 values). Based on the above features and values, 32 use cases can be obtained by cross product (i.e. 2x4x4=32). For example, the combination of use case 1 is: (ad slot: Guess you like + category: abnormal category 1 + bid: 0); the combination of use case 1 is: (ad slot: homepage focus + category: abnormal category 1 + bid: 0), etc. Through the above processing, a use case expansion can be completed.
[0119] <Product recommendation method>
[0120] The embodiments disclosed herein may also be applied to product recommendations. Figure 8 A schematic flowchart of a commodity recommendation method according to an embodiment of the present disclosure is shown.
[0121] like Figure 8 As shown, in step S8100, recommended products are obtained.
[0122] In step S8200, at least one feature of the product whose feature value needs to be changed is obtained as a target feature.
[0123] In step S8300, a feature value combination corresponding to the target feature is obtained from a pre-generated feature value combination pool.
[0124] In step S8400, based on the feature value combination corresponding to the target feature, the feature value of the corresponding target feature in the product is changed to obtain a product set having the same data structure as the product but different feature values of the target feature.
[0125] For example, for a product, there are features such as store, price, category, and brand. By changing features such as store, price, category, and brand, different recommended product sets can be constructed. In this way, a richer combination of recommended products can be provided to users, thereby meeting the different needs of different users.
[0126] Here, obtaining recommended products may include: receiving product description information; obtaining features included in the recommended products from the product description information; obtaining a matching feature set of features included in the recommended products from a pre-generated feature pool; obtaining products similar to the matching feature set from a product database to form a product recommendation list; and selecting a product from the product recommendation list as a recommended product. For example, feature extraction may be performed on the products in the product database, and the feature pool may be obtained after corpus analysis and vectorization; feature value combination training may be performed on the products in the product database to obtain a feature value combination pool.
[0127] When there are more than two target features, based on the feature value combinations corresponding to the target features, the feature values of the corresponding target features in the recommended products are changed to obtain a product set with the same structure as the recommended products but different feature values of the target features, including: cross-multiplying the feature values of different target features to achieve a feature value combination of the target features that satisfies the Cartesian product; using each feature combination, changing the feature values of the corresponding target features in the recommended products to obtain a product set with the same structure as the recommended products but different feature values of the target features.
[0128] Obtaining commodities similar to the matching feature set from a commodity database to form a commodity recommendation list includes: matching the matching feature set with feature values in a feature pool according to a condition of maximum similarity probability through a naive Bayes algorithm to obtain the commodity recommendation list.
[0129] For example, the features in the feature value combination pool are classified and stored at least according to the value type of the feature value, and the value type includes enumeration, integer operation, and Boolean.
[0130] The present invention may be a device, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0131] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0132] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0133] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0134] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0135] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0136] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0137] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0138] The above is a description of a specific embodiment of the specification. 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 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.
[0139] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A method for generating a use case, comprising: Get recommended use cases; Acquire at least one feature whose feature value needs to be changed in the recommended use case as a target feature; Obtaining a feature value combination corresponding to the target feature from a pre-generated feature value combination pool; and Based on the feature value combination corresponding to the target feature, the feature value of the corresponding target feature in the recommended use case is changed to obtain a use case set with the same structure as the recommended use case but with different feature values of the target feature, Wherein, when there are more than two target features, based on the feature value combination corresponding to the target features, the feature values of the corresponding target features in the recommended use cases are changed to obtain a use case set having the same structure as the recommended use case but different feature values of the target features, including: The eigenvalues of different target features are cross-multiplied to achieve a combination of eigenvalues of target features that satisfies the Cartesian product; Using each feature combination, the feature value of the corresponding target feature in the recommended use case is changed to obtain a use case set with the same structure as the recommended use case but with different feature values of the target feature, Get recommended use cases include: Receive use case description information; Acquire features included in the recommended use case from the use case description information; In a pre-generated feature pool, a matching feature set of features included in the recommended use case is obtained; Obtaining use cases similar to the matching feature set from a use case database to form a use case recommendation list; In the use case recommendation list, select a use case as a recommended use case.
2. The method according to claim 1, further comprising: Extracting features from the use case database, and obtaining the feature pool through corpus analysis and vectorization; Perform feature value combination training on the use cases in the use case database to obtain a feature value combination pool.
3. The method according to claim 1 or 2, wherein: From the use case database, use cases similar to the matching feature set are obtained to form a use case recommendation list, including: By using the Naive Bayes algorithm, the feature values of the features in the matching feature set and the feature pool are matched according to the condition of maximum similarity probability to obtain a use case recommendation list.
4. The method according to claim 1 or 2, wherein: The features in the feature value combination pool are classified and stored at least according to the value type of the feature value, and the value type includes enumeration, integer operation, and Boolean.
5. A device for generating a use case, comprising: The first acquisition module is used to acquire recommended use cases; A second acquisition module is used to acquire at least one feature whose feature value needs to be changed in the recommended use case as a target feature; A third acquisition module is used to obtain a feature value combination corresponding to the target feature from a pre-generated feature value combination pool; as well as The obtaining module changes the characteristic value of the corresponding target characteristic in the recommended use case based on the characteristic value combination corresponding to the target characteristic, so as to obtain a use case set with the same structure as the recommended use case but with different characteristic values of the target characteristic, Wherein, when there are more than two target features, the obtaining module is specifically used for: The eigenvalues of different target features are cross-multiplied to achieve a combination of eigenvalues of target features that satisfies the Cartesian product; Using each feature combination, the feature value of the corresponding target feature in the recommended use case is changed to obtain a use case set with the same structure as the recommended use case but with different feature values of the target feature, The first acquisition module is specifically used for: Receive use case description information; Acquire features included in the recommended use case from the use case description information; In a pre-generated feature pool, a matching feature set of features included in the recommended use case is obtained; Obtaining use cases similar to the matching feature set from a use case database to form a use case recommendation list; In the use case recommendation list, select a use case as a recommended use case.
6. An electronic device for producing a use case, comprising: A processor and a memory, wherein the memory stores executable instructions, and the executable instructions when executed by the processor implement the method according to any one of claims 1-4.
7. A product recommendation method, comprising: Get recommended products; Acquire at least one feature of the product whose feature value needs to be changed as a target feature; Obtaining a feature value combination corresponding to the target feature from a pre-generated feature value combination pool; and Based on the feature value combination corresponding to the target feature, the feature value of the corresponding target feature in the product is changed to obtain a product set with the same data structure as the product but with different feature values of the target feature, Wherein, when there are more than two target features, based on the feature value combination corresponding to the target features, the feature values of the corresponding target features in the product are changed to obtain a product set with the same structure as the product but different feature values of the target features, including: The eigenvalues of different target features are cross-multiplied to achieve a combination of eigenvalues of target features that satisfies the Cartesian product; Using each feature combination, the feature value of the corresponding target feature in the product is changed to obtain a product set with the same structure as the product but with different feature values of the target feature. Get recommended products including: Receive product description information; Acquire features of the recommended product from the product description information; In the pre-generated feature pool, a matching feature set of features included in the recommended product is obtained; Acquire products similar to the matching feature set from a product database to form a product recommendation list; In the product recommendation list, select a product as a recommended product.
Citation Information
Patent Citations
Commodity recommendation method and device
CN105469263A
Method and device for generating interface testing use case
CN106815138A
Test case intelligent matching method and device, computer equipment and storage medium
CN108536595A
