Classification processing program and classification processing method
The classification processing program uses a generation AI server with large-scale language models to extract and categorize problem and solution strings from patent data, addressing inefficiencies in natural language classification and enhancing accuracy.
Patent Information
- Application Number
- JP2025120472
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-10-11
- Filing Date
- 2025-07-17
- Publication Date
- 2025-09-11
AI Technical Summary
Existing classification processing using natural language is highly difficult and inefficient.
A classification processing program that extracts problem and solution strings from patent data, utilizing a generation AI server with large-scale language models to improve accuracy by summarizing and categorizing these strings.
Enhances the accuracy of natural language classification processing by summarizing and categorizing patent data, improving the efficiency and effectiveness of the classification process.
Smart Images

Figure 2025134057000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a classification processing program. Reach and methods. [Background technology]
[0002] Patent Document 1 discloses a patent map generation program. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Patent No. 6586614 Summary of the Invention [Problem to be solved by the invention]
[0004] In Patent Document 1, text mining processing is used for character string classification processing. However, there is a problem in that classification processing using natural language can be highly difficult.
[0005] The present invention has been made to solve such conventional problems, and has as its object to perform classification processing using natural language. [Means for solving the problem]
[0006] The present invention provides This is a classification processing program that causes a computer to execute a process of extracting problem strings and solution strings from each of the abstracts of multiple patent data. [Effects of the Invention]
[0007] Classification processing program of the present invention Reach According to the method, natural language classification Improve accuracy It is possible. [Brief explanation of the drawings]
[0008] [Figure 1] Schematic diagram of a system that executes a classification processing program [Figure 2]Block diagram of a device that executes a classification processing program [Figure 3] Flowchart of the classification processing program [Figure 4] Data Frame [Figure 5] Visualized patent data [Figure 6] Data Frame [Figure 7] Data Frame [Figure 8] Visualized review data DETAILED DESCRIPTION OF THE INVENTION
[0009] The following is an embodiment of a classification processing program. Reach The method and method will be described in detail with reference to the drawings.
[0010] Figure 1 is a schematic diagram of a system that executes a classification processing program. An information processing device (terminal 1) for executing the classification processing program is connected to a generation AI server 2 (natural language processing API server) via a network.
[0011] The generation AI server 2 is a computer that processes input natural language character strings (in the embodiment, summarization, classification generation, and classification). In the embodiment, the generation AI server 2 is a generation AI server that provides cloud-based services incorporating large-scale language models, such as OpenAI's ChatGPT (both conversational services), GPT-4 Turbo, GPT-4, GPT-3.5 Turbo, GPT-3.5, and GPT-3 (all API services). The generation AI server 2 is not limited to these, and may be any generation AI server that performs natural language processing incorporating large-scale language models that provide similar functionality (for example, Bard (both conversational services) and Gemini (all API services) developed by Google, etc.).
[0012] The generation AI server 2 of the embodiment has a CPU, memory, input / output devices, and an external interface, and performs natural language processing (in the embodiment, summarization processing, classification generation processing, and classification processing) incorporating a large-scale language model in response to input from an external device, and outputs the result.
[0013] FIG. 2 is a block diagram of an information processing device (terminal 1) for executing the classification processing program of the embodiment.
[0014] A CPU (Central Processing Unit) 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, a HDD (Hard Disk Drive) 105, an external I / F (Interface) 106, and an input unit 107 are connected via a system bus 108. The CPU 101, the ROM 102, and the RAM 103 constitute a control unit 104.
[0015] The ROM 102 stores in advance programs and thresholds to be executed by the CPU 101. The RAM 103 has various memory areas, such as an area for expanding the programs executed by the CPU 101 and a work area that serves as a work area for data processing by the programs.
[0016] The HDD 105 stores patent data (questionnaire data, natural language sentence data, etc.) input from the input unit 107. The external I / F 106 is an interface for communicating with an external device such as an external server (PC). Note that an SSD (Solid State Drive) may be used instead of an HDD.
[0017] The external I / F 106 may be any interface that performs data communication with an external device, and may be, for example, a device (such as a USB memory) that connects locally to the external device, or a network interface for communication via a wired or wireless network.
[0018] The external I / F 106 is connected to a display device (not shown) such as a liquid crystal display, etc. The input unit 107 is an input device such as a keyboard, a mouse, a scanner (reading device), etc.
[0019] The control unit 104 exchanges data with an external device (such as the generation AI server 2) via the external I / F 106 to acquire the Python library required for program execution, send character string data in natural language, and receive classification generation results and classification processing results. Python is a registered trademark. (Same below) .
[0020] (Embodiment 1: Patent Data Analysis) Next, the processing procedures of the classification processing program, system, and method of the embodiment will be explained. The following code blocks 1 to 19, connected in series, represent the program and method of the embodiment, and should generally be written consecutively. However, for ease of explanation, the code blocks 1 to 19 will be divided into the following explanation.
[0021] 3 is a flowchart of the processing of the classification processing program of the embodiment. In STEP 1, problem (first category classification in natural language) strings and solution (second category classification in natural language) strings are extracted from the summary (character string information in natural language), in STEP 2 the problem strings are summarized, in STEP 3 problem classifications are generated from the problem summaries, in STEP 4 the problem summaries are classified, in STEP 5 the solution strings are summarized, in STEP 6 solution classifications are generated from the solution summaries, in STEP 7 the solution summaries are classified, in STEP 8 the classified problems and solutions are cross-tabulated, and in STEP 9 the tabulated results are visualized.
[0022] In the embodiment, the abstract of patent data is used as the natural language character string to be processed, but the subject of the character string is not limited to this and may be character strings in the body of the specification or claims.Furthermore, character strings in natural language from surveys, user reviews, papers, etc. other than patent data may also be processed.
[0023] (STEP 1: Extraction of strings from problems and solutions) First, the control unit 104 extracts problem strings and solution strings from the abstracts of multiple patent data. The program is as follows. The following program is a Python program stored in the control unit of the terminal 1. However, other programming tools and programming languages (VBA, GAS, etc.) may also be used. The following program is merely an example, and the processing order and the libraries, functions, and variable names used may be changed.
[0024] (Code Block 1) import pandas as pd # Loading data # Using Google Drive from google.colab import drive drive.mount(' / content / drive') # Load data (from Google Drive) df = pd.read_excel(' / content / drive / MyDrive / patdata.xlsx') # Separating the problem from the solution # Extract the strings between the problem and the solution, and between the solution and the selection diagram, and add them as new columns (problem, solution) df['problem'] = df['summary'].str.extract('[issue](.+?)[solution]', expand=False) df['solution'] = df['summary'].str.extract('[Solution](.+?)[Selection]', expand=False)
[0025] This program can be explained as follows. First, the control unit 104 imports a module called pandas. Pandas is a tool for performing data analysis in Python. Next, it imports a function called drive from a module called google.colab. Drive is a function for accessing Google Drive. Google is a registered trademark.
[0026] The control unit 104 executes the drive function to mount Google Drive to the path ' / content / drive'. Mounting means that files and folders in Google Drive can be operated on Google Colab.
[0027] The control unit 104 uses the pd.read_excel function to read the Excel file patdata.xlsx located in the path ' / content / drive / MyDrive / patdata.xlsx' (note that the file format is not limited to Excel; CSV format is also possible using other functions). This Excel file stores patent data containing multiple abstract data (character string data in natural language). Figure 4 shows a portion of the patent data converted into a data frame. The summary column of the data frame stores the contents of the patent abstracts. Note that Figure 4 only shows 20 abstracts due to space constraints, but in this embodiment, a data frame with 50 abstracts (50 rows) is used. Of course, more or less than this number is possible. Also, in Figure 4, the summary column does not display the entire abstract due to space constraints, but in reality, the entire abstract is stored in a single cell in the Excel file. Note that Excel is a registered trademark. Note that the data frame in STEP 1 only contains a summary column. The processing in the following steps will add columns other than the summary column to the data frame.
[0028] The control unit 104 assigns the read file to a variable called df. df is a tabular data structure called a data frame. By specifying df['summary'], only the column called summary is extracted from df. The summary column stores the contents of the patent abstract written in natural language.
[0029] The control unit 104 uses the str.extract function to extract the string from "Problem" to "Solution" from the summary column. This string represents the patent problem (this is called problem string information). The extracted string is added to a new column called problem. By setting df['problem'] = ..., a new column called problem is created in df (the problem column in Figure 4).
[0030] Similarly, the control unit 104 uses the str.extract function to extract the string from "Solution" to "Selection diagram" from the summary column. This string represents the solution of the patent (this is called solution string information). The extracted string is added to a new column called "solution." By setting df['solution'] = ..., a new column "solution" is created in df (the solution column in Figure 4).
[0031] Note that the process of extracting the "problem" and "solution" strings from this summary is not mandatory. In other words, the entire summary can be sent as text information to the generation AI server as is, and then classified into problems and solutions (first and second categories). However, by extracting and processing the "problem" and "solution" strings separately, the classification accuracy of the generation AI server 2 can be improved, so it is preferable to include a process of extracting the "problem" and "solution" strings.
[0032] (STEP 2: Summary of the issue) Next, the control unit 104 sends the assignment string information (first category string information) and assignment summary instruction information (first category string summary instruction information) to the generation AI server 2, and receives the assignment summary information from the generation AI server 2. The program is as follows.
[0033] (Code Block 2) ! pip install openai import openai import re # Text preprocessing function (if needed) def clean_text(text): text = re.sub(r'\s+', ' ', text) # Remove duplicate spaces text = re.sub(r'[^\w\s]', '', text) # Remove punctuation and other special characters return text
[0034] This command installs the OpenAI Python library. The ! indicates that the command should be interpreted as a shell command. pip is a Python package manager, and install is the command used to install libraries.
[0035] The control unit 104 imports Python libraries called openai and re. The openai library is for executing various natural language processing tasks using the OpenAI API, and the re library is for using regular expressions. Note that using the openai library actually requires input of an API key, but this is omitted from the program description because it would be difficult to make public.
[0036] (Code Block 3) def clean_text(text): text = re.sub(r'\s+', ' ', text) text = re.sub(r'[^\w\s]', '', text) return text
[0037] This program is a function that returns a string with special characters and extra spaces removed from the string (text) received as an argument. Specifically, it uses re (regular expression operations), a standard library of Python, to manipulate the string.
[0038] re.sub(r'\s+', ' ', text) replaces consecutive whitespace characters with a single whitespace character. \s represents a whitespace character, and + indicates that it can occur more than once. In other words, it replaces multiple whitespace characters with a single one.
[0039] Next, re.sub(r'[^\w\s]', '', text) removes any characters that are not alphanumeric or whitespace. [^\w\s] stands for any characters that are not alphanumeric or whitespace, and ^ stands for negation, so this means get rid of any characters that are not alphanumeric or whitespace.
[0040] Finally, return the cleaned string. return text indicates that the cleaned string is returned as the output of the function. Note that this code block 3 is not required.
[0041] Next, the control unit 104 transmits the assignment string information and assignment summary instruction information to the generation AI server 2, and receives the assignment summary information (first category string summary result information) from the generation AI server 2. The program is as follows.
[0042] (Code Block 4) # A function to generate an issue summary def generate_p_summary(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "Please summarize the issue this article addresses in 10 characters or less."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, #top_p=1.0, frequency_penalty=0, presence_penalty=0, ) p_summary = response["choices"][0]["message"]["content"] return p_summary
[0043] This program uses OpenAI's language model "GPT-4" to provide the ability to summarize a given sentence. Note that the language model is not limited to "GPT-4," but can also be "GPT-4 Turbo," "GPT-3.5 Turbo," or the next version of the GPT series. These are known to demonstrate high accuracy in natural language processing tasks.
[0044] The generate_p_summary(text) function receives a single text (text) as an argument, and the control unit 104 calls OpenAI's Chat Completion API to summarize that text. The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information (prompt) saying, "Please summarize the task indicated by this sentence in 10 characters or less." This instruction information is called task summary instruction information. Note that the number of characters to be summarized is not limited to 10 characters; it can be more or less than this. It is recommended to adjust the number of characters according to the upper limit of the number of tokens processed by the generation AI server.
[0045] The generation AI server 2 summarizes the given text (task string information) based on the task summary instruction information and returns it as task summary information. The response from the generation AI server 2 contains the summarized text (task summary information). The task summary information is stored in the p_summary variable and returned as the output of the function.
[0046] (Code Block 5) # Add issue summary to a new column df['p_summary'] = df['problem'].apply(lambda x: generate_p_summary(clean_text(x)))
[0047] This part of the program cleans up the text of each row stored in the 'problem' column of the Pandas data frame df using the clean_text function, and then adds the summarized results (problem summary information) using the generate_p_summary function to a new column 'p_summary' in df (the p_summary column in Figure 4).
[0048] The clean_text function removes unnecessary whitespace and special characters from the input text and formats the text in a format that is easy for the GPT-4 model to interpret. The generate_p_summary function then receives the formatted text and summarizes it using the GPT-4 model. The summarized result is stored in a new column 'p_summary' in the data frame df (the p_summary column in Figure 4). Note that processing by the clean_text function is not required.
[0049] In the embodiment, due to the upper limit on the number of tokens processed by the generation AI server, steps 2 and 5 are provided to generate a summary of the problem and solution, but if there is no upper limit on the number of tokens (or if the upper limit is large), steps 2 and 5 may be omitted. In other words, the entire text of the problem and solution (or the entire text of the abstract) may be sent to the generation AI server 2, and the subsequent classification generation process and classification process may be performed. However, from the perspective of processing speed and the cost of using the generation AI, it is preferable to perform summary processing.
[0050] (STEP 3: Issue classification generation step) Next, the control unit sends multiple pieces of assignment summary information (first category string summary result information) and assignment classification generation instruction information (first category string classification generation instruction information) to the generation AI server 2, and receives assignment classification information from the generation AI server 2. The program is as follows.
[0051] (Code Block 6) # Extract the data from the 'p_summary' column of the DataFrame and store it in a variable called p_summaries p_summaries = df['p_summary'].values # Combine all summaries into one string p_summaries_text = ', '.join(p_summaries)
[0052] This part of the program gets all the values of the 'p_summary' column from the Pandas data frame df and stores them in a variable called p_summaries. Specifically, df['p_summary'].values gets all the values of the 'p_summary' column of the df data frame.
[0053] Next, each element of the 'p_summaries' variable (the summary of each task) is concatenated with a comma and a space (', ') and converted into a single large task summary string (p_summaries_text). This operation combines the list of task summaries into a single string, which can be used in subsequent processing. In other words, this process combines the summarized strings of 10 characters or less into a single string. For example, if the number of summaries is 50, the issue summary string (p_summaries_text) will be: "Noise reduction, Unintended noise reduction, Motor temperature management, Exhaust port blockage prevention, Tangling prevention, Dust disposal improvement, Charging stability, Dust removal efficiency, Suction power improvement, Tangling prevention, Suction efficiency improvement, Dust disposal frequency, Operation instruction improvement, Battery degradation prevention, Communication, Floor type adaptability, Cleaning and storage improvement, Tangling prevention, Floor surface detection improvement, Leg cleaning improvement, Weight reduction and stress relief, Structural simplification, Storage and compactness, Power terminal protection, Support function improvement, Starting performance improvement, Easier dust disposal, Separation efficiency improvement, Dust collection improvement, Dust collection efficiency improvement, Connectivity improvement, Pressure drop reduction, Filter clogging prevention, Fiber tangling prevention, Easy dust disposal, Temperature rise reduction, Usage mode switching, Cleaning performance improvement, Filter cleaning reduction, Dust charging efficiency, Standing stability improvement, The string will be something like "Improved map efficiency, efficiency and simplicity, pursuit of compactness, improved distance stability, side brush stop, side brush control, separation part cleaning confirmation, improved airtightness and noise, improved impact reduction."
[0054] (Code Block 7) # Function to generate issue classification def generate_p_classification(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "Classify the terms in these assignments into 10 categories and output only the category names."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, frequency_penalty=0, presence_penalty=0, ) p_classification = response["choices"][0]["message"]["content"] return p_classification
[0055] The program uses OpenAI's language model GPT-4 to provide the ability to generate classifications from given sentences.
[0056] The generate_p_classification(text) function receives a single text (text) as an argument, and the control unit 104 calls OpenAI's Chat Completion API to generate a classification from that text (task summary string). The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information (prompt) saying, "Classify these task terms into 10 categories and output the classification names." This instruction information is called task classification generation instruction information (first category classification generation instruction information). Note that the number of task categories is not limited to 10 and can be more or less. Furthermore, the content of the prompt is not limited to this and can be more detailed instructions.
[0057] The generation AI server 2 generates a classification for the given text (task summary string) based on the task classification generation instruction information and returns it. The response from the generation AI server 2 includes the task classification text (task classification information). The task classification information is stored in the p_classification variable and returned as the function output.
[0058] (Code Block 8) # Generate issue classification p_classification = generate_p_classification(p_summaries_text)
[0059] This program calls the generate_p_classification function with the generated p_summaries_text (the summaries of all tasks combined into one string) as an argument.
[0060] The generate_p_classification function is responsible for generating a classification for text (in this case, the task summary) using OpenAI's GPT-4 model. Specifically, the function prompts GPT-4 to "categorize these task terms into 10 categories and output only the classification names," and GPT-4 generates 10 categories based on that.
[0061] When this code is executed, the problem summaries (p_summaries_text) are classified into 10 categories, and the results (classification names) are stored in the p_classification variable. That is, the p_classification variable stores each of the 10 problem classifications as a single string, such as "Noise and vibration management, Thermal management, Power and efficiency, Tangle prevention and resolution, User interface and usability, Power and battery management, Design and construction, Storage and cleaning, Robustness and durability, Connection and communication."
[0062] (STEP 4: Issue classification processing step) Next, the control unit sends task classification instruction information including multiple task summary information and task classification information to the generation AI server 2, and receives task classification result information from the generation AI server 2. The program is as follows.
[0063] (Code Block 9) # Function to apply task classification def generate_p_class(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": f"Please assign one of the classifications listed in '{p_classification}' to the following text."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, #top_p=1.0, frequency_penalty=0, presence_penalty=0, ) p_class = response["choices"][0]["message"]["content"] return p_class
[0064] The program uses OpenAI's language model GPT-4 to provide the ability to apply existing problem classifications to given text.
[0065] The generate_p_class(text) function receives one text (text) as an argument. The control unit 104 calls OpenAI's Chat Completion API to apply an existing task classification to that text (task summary). The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information such as "Please assign one of the classifications in '{p_classification}' to the sentence to be entered next." This instruction information is called task classification instruction information (first category classification processing instruction information).
[0066] The generation AI server 2 applies an existing task classification (p_classification) to the given text (task summary) and returns it as task classification result information (first category classification processing result information). As described above, the p_classification variable stores a summary classification as a single string, such as "noise and vibration management, heat management, power and efficiency, tangling prevention and resolution, user interface and operability, power and battery management, design and construction, storage and cleaning, robustness and durability, and connectivity and communication." The response from the generation AI server 2 includes the text of the applied task classification (task classification result information) (e.g., one of the classification texts from "noise and vibration management, heat management, power and efficiency, tangling prevention and resolution, user interface and operability, power and battery management, design and construction, storage and cleaning, robustness and durability, and connectivity and communication"). The task classification result information (first category classification processing result information) is stored in the p_class variable and returned as the function output. Although this prompt instructs the user to assign the item to one of the categories, it may also instruct the user to assign the item to multiple categories.
[0067] (Code Block 10) # Add issue classification to a new column df['p_class'] = df['p_summary'].apply(lambda x: generate_p_class(x))
[0068] This program calls the generate_p_class function with the text of each row stored in the p_summary column of the data frame df as an argument.
[0069] The generate_p_class function is responsible for assigning (applying) a classification to text (in this case, the task summary) using OpenAI's GPT-4 model. Specifically, the function prompts GPT-4 with the following instruction: "For the next sentence, please assign one of the classifications in '{p_classification}'." Based on this, GPT-4 assigns an appropriate classification to the task summary.
[0070] When this code is executed, each issue summary (each row in the p_summary column) will be classified, and the result (classification name) will be stored in the p_class column of the newly created df (p_class column in Figure 4). In other words, each issue summary will have one classification (p_class) (for example, one of the following classifications: Noise and vibration management, Thermal management, Power and efficiency, Tangle prevention and resolution, User interface and usability, Power and battery management, Design and construction, Storage and cleaning, Robustness and durability, Connectivity and communication).
[0071] (STEP 5: Solution Summary Step) Next, the control unit 104 sends the solution means string information (second category string information) and solution means summary instruction information (second category string summary instruction information) to the generation AI server 2, and receives the solution means summary information (second category string summary result information) from the generation AI server 2. The program is as follows. Note that although the strings handled in STEPs 5 to 7 are different from those in STEPs 2 to 4, the processing is almost the same, so an explanation of some of the code will be omitted.
[0072] (Code Block 11) # A function to generate a summary of the solutions def generate_s_summary(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "Summarize the solution this article provides in 15 characters or less."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, #top_p=1.0, frequency_penalty=0, presence_penalty=0, ) s_summary = response["choices"][0]["message"]["content"] return s_summary
[0073] The program uses OpenAI's language model GPT-4 to provide the ability to summarize a given sentence.
[0074] The generate_s_summary(text) function receives a single text (text) as an argument, and the control unit 104 calls OpenAI's Chat Completion API to summarize that text. The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information (prompt) saying, "Please summarize the solution indicated by this text in 15 characters or less." This instruction information is called solution summary instruction information (second category string summary instruction information). Note that the number of characters to be summarized is not limited to 15 characters; it can be more or less than this. It is recommended to adjust the number of characters depending on the upper limit of the number of tokens processed by the generation AI server.
[0075] The generation AI server 2 summarizes the given text (solution means string information) based on the solution means summary instruction information and returns it as solution means summary information (second category string summary result information). The response from the generation AI server 2 contains the summarized text (solution means summary information). The solution means summary information is stored in the s_summary variable and returned as the output of the function.
[0076] (Code Block 12) # Add a new column for the solution summary df['s_summary'] = df['solution'].apply(lambda x: generate_s_summary(clean_text(x)))
[0077] This part of the program cleans up the text of each row stored in the 'solution' column of the Pandas data frame df using the clean_text function, and then adds the summarized results (solution summary information) using the generate_s_summary function to a new column 's_summary' of df (the s_summary column in Figure 4).
[0078] (STEP 6: Solution classification generation step) Next, the control unit sends multiple pieces of solution means summary information (second category string summary result information) and solution means classification generation instruction information (second category classification generation instruction information) to the generation AI server 2, and receives solution means classification information (second category classification result information) from the generation AI server 2. The program is as follows.
[0079] (Code Block 13) # Extract data from the 's_summary' column of the DataFrame and store it in a variable called s_summaries s_summaries = df['s_summary'].values # Combine all summaries into one string s_summaries_text = ', '.join(s_summaries)
[0080] This part of the program gets all values of the 's_summary' column from the Pandas data frame df and stores them in a variable called s_summaries. Specifically, df['s_summary'].values gets all values of the 's_summary' column of the df data frame.
[0081] Next, each element of the 's_summaries' variable (the summary of each solution) is concatenated with a comma and a space (', ') and converted into a single large string of solution summaries (s_summaries_text). This operation combines the list of solution summaries into a single string, which can be used in subsequent processing. In other words, this is a process of combining the summarized strings of 15 characters or less into a single string. For example, if the number of summaries is 50, the solution summary string (s_summaries_text) will be: "A pair of scraping rollers, automatic operation mode switching function, blowing / suction circulation structure, special shape design of the yoke, air flow guide function, stick storage support base, improved power terminal layout, tube body holding section and regulating section, resistance detection and input control, double operation cover opening / closing, spiral inclined surface installation, two-stage dust collection communication device, suction nozzle protrusion straightening, no-touch connection / support device, dust separator / disk, suction control / filter section, rotating brush / cloth member, locking mechanism / operating member, battery-side exhaust passage, dual-use structure / handle section, circular path / climbing control, inner cylinder structure and second filter section, combination of charging section and dust collection section, shared leg section and first leg section layout, regulating line receiving section and magnifying display section, first side cleaning member, three legs and battery section, rotating cleaning body and drive mechanism, The string will be something like "Control device and secondary battery, floor type detection and control device, first centrifugal separation unit and second centrifugal separation unit, movable cleaning body and side fixed brush, battery storage unit layout."
[0082] (Code Block 14) # Function to generate solution classification def generate_s_classification(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "Classify these solution terms into 10 categories and output only the category names."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, frequency_penalty=0, presence_penalty=0, ) s_classification = response["choices"][0]["message"]["content"] return s_classification
[0083] The program uses OpenAI's language model GPT-4 to provide the ability to generate classifications from given sentences.
[0084] The generate_s_classification(text) function receives one text (text) as an argument, and the control unit 104 calls OpenAI's Chat Completion API to generate a classification from that text (solution summary string). The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information (prompt) saying, "Classify these solution terms into 10 categories and output only the classification names." This instruction information is called solution classification generation instruction information. Note that the number of solution categories is not limited to 10 and can be more or less. Furthermore, the content of the prompt is not limited to this and can be more detailed instructions.
[0085] The generation AI server 2 generates a classification based on the given text (solution means summary string) based on the solution means classification generation instruction information, and returns it as solution means classification generation result information (second category classification generation result information). The response from the generation AI server 2 includes the solution means classification text (solution means classification information). The solution means classification information is stored in the s_classification variable and returned as the function output.
[0086] (Code Block 15) # Generate a solution classification s_classification = generate_s_classification(s_summaries_text)
[0087] This program calls the generate_s_classification function with the generated s_summaries_text (the summaries of all solutions combined into one string) as an argument.
[0088] The generate_s_classification function is responsible for generating a classification for the text (in this case, the solution summary) using OpenAI's GPT-4 model. Specifically, the function prompts GPT-4 to "categorize these solution terms into 10 categories and output only the classification names," and GPT-4 generates 10 categories based on that.
[0089] When this code is executed, the solution summary (s_summaries_text) is classified into 10 categories, and the result (classification name) is stored in the s_classification variable. That is, the s_classification variable stores 10 solution classifications, such as "operation and control mechanism, structure and design, dust collection device, power supply and charging device, maintenance and life management, shape and design, brush and cleaning mechanism, user interface and function, air flow and exhaust device, power supply and charging device," as a single string.
[0090] (STEP 7: Solution classification processing step) Next, the control unit 104 sends solution means classification instruction information including multiple solution means summary information and solution means classification information to the generation AI server 2, and receives solution means classification result information (second category classification processing result information) from the generation AI server 2. The program is as follows.
[0091] (Code 16) # Function to apply solution classification def generate_s_class(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": f"Please assign one of the classifications from '{s_classification}' to the following sentence."}, {"role": "user", "content": text}], temperature=0.10, max_tokens=10, #top_p=1.0, frequency_penalty=0, presence_penalty=0, ) s_class = response["choices"][0]["message"]["content"] return s_class
[0092] The program uses OpenAI's language model GPT-4 to provide the ability to apply existing solution classifications to a given sentence.
[0093] The generate_s_class(text) function receives one text (text) as an argument. The control unit 104 calls OpenAI's Chat Completion API to apply an existing solution classification to that text (solution summary). The API sends a message consisting of two roles, one for the system and one for the user, and the system sends instruction information such as "Please assign one of the classifications in '{s_classification}' to the sentence to be entered next." This instruction information is called solution classification instruction information.
[0094] The generation AI server 2 applies an existing solution means classification (p_classification) to the given text (solution means summary) and returns it as solution means classification processing result information (second category classification processing result information). The s_classification variable stores a solution means classification as a single string, such as "operation and control mechanism, structure and design, dust collection device, power supply and charging device, maintenance and lifespan management, shape and design, brush and cleaning mechanism, user interface and function, air flow and exhaust device, power supply and charging device." The response from the generation AI server 2 includes the text of the applied solution means classification (solution means classification processing result information) (for example, one of the classification texts from "operation and control mechanism, structure and design, dust collection device, power supply and charging device, maintenance and lifespan management, shape and design, brush and cleaning mechanism, user interface and function, air flow and exhaust device, power supply and charging device"). The solution means classification result information is stored in the s_class variable and returned as the function output. Although this prompt instructs the user to assign the item to one of the categories, it may also instruct the user to assign the item to multiple categories.
[0095] (Code Block 17) # Add solution classification to a new column df['s_class'] = df['s_summary'].apply(lambda x: generate_s_class(x))
[0096] This program calls the generate_s_class function with the text of each row stored in the s_summary column of the data frame df as an argument.
[0097] The generate_s_class function is responsible for assigning (applying) a classification to text (in this case, a solution summary) using OpenAI's GPT-4 model. Specifically, the function gives GPT-4 the instruction "Please assign one of the classifications in '{s_classification}' to the next input sentence," and based on that, GPT-4 will assign an appropriate classification to the solution summary.
[0098] When this code is executed, each solution summary (each row in the s_summary column) will be classified, and the result (classification name) will be stored in the s_class column of the newly created df. That is, each solution summary will have one classification (s_class) (e.g., one of the following classifications: operation and control mechanism, structure and design, dust collection device, power supply and charging device, maintenance and life management, shape and design, brush and cleaning mechanism, user interface and function, air flow and exhaust device, power supply and charging device) (s_class column in Figure 4).
[0099] (STEP 8: Aggregation step) Next, the control unit 104 cross-tabulates the plurality of summaries (character string information) for each problem classification and solution classification. The program is as follows.
[0100] (Code Block 18) # Group by the columns "p_class" and "s_class" and count the number of elements in each group result = df.groupby(['p_class', 's_class']).size().reset_index(name='Counts')
[0101] In this program, the control unit 104 performs a so-called cross-tabulation, where data frames are grouped by p_class and s_class, and summaries are counted (aggregated) by problem classification and solution classification. This operation allows us to know the frequency of occurrence of solutions for each problem.
[0102] (STEP 9: Visualization step) Next, the control unit 104 performs visualization using the p_class and s_class derived above. The program is as follows:
[0103] (Code Block 19) # Map generation ! pip install japanize-matplotlib import matplotlib.pyplot as plt import numpy as np import matplotlib.cm as cm import japanize_matplotlib # Convert the values of the "'p_class'" and "'s_class'" columns into a list format y = result['p_class'].tolist() x = result['s_class'].tolist() # Create a list showing the magnitudes of all points in the scatter plot based on the values in the "Counts" column sizes = [size * 100 for size in result['Counts'].tolist()] # Create a list of the counts for all points in the scatter plot based on the values in the "Counts" column nums = [num for num in result['Counts'].tolist()] # Create a list of categories based on the values in the "s_class" column categories = list(set(y)) # Create a color map colors = cm.rainbow(np.linspace(0, 1, len(categories))) colors = {categories[i]: colors[i] for i in range(len(categories))} colors = [colors[item] for item in y] # Create a scatter plot fig, ax = plt.subplots(figsize=[8,8]) ax.scatter(x, y, s=sizes, c=colors) # Display counts on scatter plot for i, txt in enumerate(nums): ax.annotate(txt, (x[i], y[i]), textcoords="offset points", xytext=(0,0), ha='left', va='bottom') # Set the x-axis label. ax.set_xlabel("Solution") # Set the y-axis label. ax.set_ylabel("issue") # Set the title. ax.set_title("Problem-Solution Map") # Tilt the X-axis items by 90 degrees plt.xticks(rotation=90) # Show diagram plt.show()
[0104] This program processes Japanese text data to create what is known as a problem-solution map.
[0105] The control unit 104 creates a scatter plot using matplotlib. It places s_class on the x-axis and p_class on the y-axis, and sets the size and color of each point based on its category. Specifically, the color corresponding to the y column value (task category) of the grouped results is obtained from the color list generated by the rainbow color map. In addition, the count number of the category represented by that point is displayed for each point.
[0106] Finally, the control unit 104 sets the style of the graph and displays the graph on a display device (not shown) such as a liquid crystal display connected via the external I / F 106 (FIG. 5). Note that the mapping may be done using other libraries such as seaborn instead of matplotlib, and the data may be output in the form of a two-way table or heat map using the crosstab function instead of a graph.
[0107] Furthermore, the visualization is not limited to this, and may be a time series diagram showing the relationship between the application date of the patent data and the above classification, or a line or bar graph showing the relationship between the applicant of the patent data and the above classification.
[0108] In the embodiment, Python is used as the programming language, but other programming languages may be used to process the embodiment. Furthermore, VBA or GAS in spreadsheet software such as Excel or Google Spreadsheets may be used to process the embodiment. Furthermore, although input and output to ChatGPT and Excel are performed manually, ChatGPT and Excel may be used to process the embodiment.
[0109] Furthermore, in the embodiment, due to the upper limit on the number of tokens processed by the generation AI server, summaries of the problem and solution are generated in STEPs 2 and 5, but if there is no upper limit on the number of tokens, STEPs 2 and 5 may be omitted. In this case, the program is as follows: A computer connected via a network to a generation AI server that provides natural language processing using a large-scale language model performs the following steps: extracting problem string information and solution string information from each of the abstracts of multiple patent data; transmitting multiple pieces of problem string information and problem classification generation instruction information, and multiple solution string information and solution classification generation instruction information, to the generation AI server; and transmitting problem classification information generated by the generation AI server from the multiple problem string information based on the problem classification generation instruction information, and solution information generated by the generation AI server from the multiple solution string information based on the solution classification generation instruction information. A program that executes the following processes: receiving classification information from a generation AI server; sending task classification instruction information including multiple task string information and task classification information, and solution means classification instruction information including multiple solution means string information and solution means classification information to the generation AI server; receiving task classification result information obtained by the generation AI server classifying the task string information based on the task classification instruction information, and solution means classification result information obtained by the generation AI server classifying the solution means string information based on the solution means classification instruction information; and aggregating the task classification result information and the solution means classification result information.
[0110] (Embodiment 2: Survey Analysis) Next, the processing procedure of the classification processing program and method of embodiment 2 will be explained. In embodiment 2, an example is shown in which user reviews of a vacuum cleaner are classified, tabulated, and visualized. The program and method of the embodiment are formed by connecting the following code blocks 1 to 8 in succession, and should basically be written consecutively. However, for ease of explanation, they will be explained in parts.
[0111] In the processing of the classification processing program and method of embodiment 2, in STEP 1, a needs classification (classification using natural language) is generated, in STEP 2, user reviews are classified, in STEP 3, the classified user reviews are aggregated, and in STEP 4, the aggregated results are visualized (flowchart omitted).
[0112] (STEP 1: Classification generation step) First, the control unit 104 creates a data frame from multiple user reviews. The program is as follows. The following program is a Python program stored in the control unit of the information processing device (terminal 1). However, other programming tools and programming languages may also be used. The following program is merely an example, and the processing order and the libraries, functions, and variable names used may be changed.
[0113] (Code Block 1) import pandas as pd from google.colab import drive drive.mount(' / content / drive') df = pd.read_excel(' / content / drive / MyDrive / reviewdata.xlsx')
[0114] A detailed explanation of this program is as follows. First, the control unit 104 imports a module called pandas. Pandas is a tool for performing data analysis in Python. Next, it imports a function called drive from a module called google.colab. Drive is a function for accessing Google Drive.
[0115] The control unit 104 executes the drive function to mount Google Drive to the path ' / content / drive'. Mounting means that files and folders in Google Drive can be operated on Colab.
[0116] The control unit 104 uses the pd.read_excel function to read the Excel file called reviewdata.xlsx located in the path ' / content / drive / MyDrive / reviewdata.xlsx'. This Excel file stores multiple user reviews. A portion of the data frame is shown in Figure 6. The review column of the review data stores the contents of the user reviews. Note that due to space limitations, Figure 6 only shows an example of three reviews, but in this embodiment, a data frame with 100 reviews is used. Of course, more or less than this number is also possible.
[0117] The control unit 104 assigns the read file to a variable called df. df is a tabular data structure called a data frame. By specifying df['review'], only the column called review is extracted from df. The review column stores the content of user reviews written in natural language (review string information).
[0118] (Code Block 2) ! pip install openai import openai
[0119] This command installs the OpenAI Python library. The ! indicates that the command should be interpreted as a shell command. pip is a Python package manager, and install is the command used to install libraries.
[0120] The control unit 104 imports a Python library called openai. The openai library is used to execute various natural language processing tasks using the OpenAI API. Note that, although input of an API key is actually required to use the openai library, this is omitted from the program description because it would be difficult to make it public.
[0121] (Code Block 3) # Function to generate needs classification def generate_n_classification(): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": "Generate 10 vacuum cleaner needs classifications and output only the classification names."}, ], temperature=0.10, max_tokens=100, frequency_penalty=0, presence_penalty=0, ) n_classification = response["choices"][0]["message"]["content"] return n_classification
[0122] The program uses OpenAI's language model GPT-4 to provide the ability to generate a classification of vacuum cleaner needs.
[0123] The generate_n_classification() function calls OpenAI's Chat Completion API to generate classifications. The API sends a message consisting of the system's role, and the system sends instruction information (prompt) such as, "Generate 10 need classifications for vacuum cleaners and output only the classification names." This instruction information is used as need classification generation instruction information. Note that the number of need classifications is not limited to 10 and may be more or less. The content of the prompt is also not limited to this and may be more detailed. In the first embodiment, classifications are generated from patent data. However, in the second embodiment, classifications are generated from training data held by a large-scale language model without providing review data in advance. This method can be adopted when sufficient training data related to products, such as vacuum cleaners, exists in a large-scale language model.
[0124] The generation AI server 2 generates a needs classification based on the needs classification generation instruction information and returns it as needs classification generation result information. The response from the generation AI server 2 includes the needs classification text (needs classification). The needs classification is stored in the n_classification variable and returned as the output of the function.
[0125] (Code Block 4) # Generate needs classification n_classification = generate_n_classification()
[0126] This program calls the generate_n_classification function.
[0127] The generate_n_classification function is responsible for generating a classification of text (in this case, needs) using OpenAI's GPT-4 model. Specifically, the function gives GPT-4 the prompt, "Generate 10 need classifications for vacuum cleaners and output only the classification name." Based on this, GPT-4 generates 10 need classifications.
[0128] When this code is executed, generation AI server 2 generates 10 need classifications: 'comfortable cleanliness', 'effort reduction', 'improved housework efficiency', 'safe hygiene management', 'stress-free operation', 'pride in one's home', 'satisfaction with ease of use', 'comfortable living environment', 'satisfaction with time savings', and 'confidence in making a wise choice', and stores the results (classification names) in the n_classification variable. In other words, the n_classification variable stores the 10 need classifications as a single string, such as "'comfortable cleanliness', 'effort reduction', 'improved housework efficiency', 'safe hygiene management', 'stress-free operation', 'pride in one's home', 'satisfaction with ease of use', 'comfortable living environment', 'satisfaction with time savings', and 'confidence in making a wise choice'." (STEP 2: Classification processing step)
[0129] Next, the control unit 104 transmits the needs classification processing instruction information including the multiple review string information and the multiple needs classifications to the generation AI server, and receives the needs classification processing result information from the generation AI server. The program is as follows.
[0130] (Code Block 5) def generate_n_class(text): response = openai.ChatCompletion.create( model="gpt-4", messages=[ {"role": "system", "content": f"Please assign one of the classifications from '{n_classification}' to the following sentence."}, {"role": "user", "content": text}]) n_class = response["choices"][0]["message"]["content"] return n_class
[0131] This program uses OpenAI's language model "GPT-4" to provide the ability to classify a given sentence into one of five categories. Note that the language model is not limited to "GPT-4," but can also be "GPT-4 Turbo," "GPT-3.5 Turbo," or the next version of the GPT series.
[0132] The generate_n_class(text) function receives one text (text) as an argument, and the control unit 104 calls OpenAI's Chat Completion API to classify the text. The API sends a message consisting of two roles, one for the system and one for the user, and the system sends an instruction saying, "Please assign one of the classifications in '{n_classification}' to the next sentence you enter." This instruction information is used as needs classification processing instruction information.
[0133] As described above, the n_classification variable stores character strings for ten need classifications, such as "'Comfortable cleanliness', 'Reduced effort', 'Improved housework efficiency', 'Reliable hygiene management', 'Stress-free operation', 'Pride in home', 'Satisfaction with ease of use', 'Comfortable living environment', 'Satisfaction with time savings', and 'Confidence in making wise choices'." The prompts may be more detailed. While the embodiment instructs users to classify items into one category, the prompts may also be more detailed. Furthermore, the number of categories is not limited to 10, and may be more or less than 10.
[0134] The generation AI server 2 classifies the given text (needs string information) into the appropriate category based on the needs classification instruction information and returns it as needs classification processing result information. The response from the generation AI server 2 includes the classified category text (needs classification result information). The needs classification result information is stored in the n_class variable and returned as the output of the function.
[0135] (Code Block 6) df['n_class'] = df['review'].apply(lambda x: generate_n_class(x))
[0136] This program processes each row of text stored in the review column of the Pandas data frame df using the generate_n_class function, generates a classification (n_class), and adds the resulting classification to a new column n_class in df.
[0137] The control unit 104 uses the apply method to add lambda x: to the character strings in each row of the df['review'] column, which indicates an argument to be applied to x.
[0138] The control unit 104 passes the text to the generate_n_class function, classifies the text into one of the 10 categories, and assigns the result to the df['n_class'] column. Finally, the data frame df including the new n_class column is returned, as shown in FIG.
[0139] Figure 7 shows a data frame to which the n_class column has been added by the processing of STEP 2. Note that due to space limitations, only 20 items (20 rows) are shown in Figure 7, but in this embodiment, a data frame df consisting of 100 items (100 rows) is generated. Also, the contents of the review column are omitted because they were shown in Figure 6.
[0140] (STEP 3: Aggregation step) Next, the control unit 104 performs a process of aggregating the multiple reviews (character string information) for each of the multiple categories (needs categories) based on the needs classification process result information.
[0141] (Code Block 7) df_n_class_counts = df['n_class'].value_counts().sort_index().reset_index() df_n_class_counts.columns = ["Need Classification", "Count"]
[0142] df['n_class'].value_counts(): This part calculates the frequency of values in the column called n_class of the dataframe df. The value_counts() function counts how often different values appear in a dataframe and returns a new dataframe or series with those frequencies.
[0143] .sort_index(): This method sorts the obtained frequency data based on the index (here the n_class value). This is used to re-sort based on the original value (n_class) since by default it is sorted based on the frequency of the values.
[0144] .reset_index(): This method resets the index and converts the existing index to a regular column, which keeps the original index (n_class value) as a column in the new DataFrame.
[0145] df_n_class_counts.columns = ["Need Class", "Count"]: Finally, we rename the columns in the newly created data frame df_n_class_counts. We name the first column (which contains the original n_class values) "Need Class", and the second column with frequency values "Count".
[0146] (STEP 4: Visualization step) Next, the control unit 104 visualizes the counting results. The program is as follows.
[0147] (Code Block 8) ! pip install japanize-matplotlib import matplotlib.pyplot as plt import japanize_matplotlib plt.figure(figsize=(10, 6)) plt.plot(df_n_class_counts['Needs classification'], df_n_class_counts['Number of cases']) plt.title('Number of items by need category') plt.xlabel('Needs classification') plt.ylabel('number of items') plt.show()
[0148] !pip install japanize-matplotlib: This is the command to install the japanize-matplotlib package, which is used to display Japanese characters correctly in matplotlib.
[0149] import matplotlib.pyplot as plt: Here, we import the matplotlib pyplot module with the name plt.
[0150] import japanize_matplotlib: This line imports the japanize-matplotlib library that you installed earlier.
[0151] plt.figure(figsize=(10, 6)): This specifies the size of the graph. Here, we create a figure (graph) that is 10 inches wide and 6 inches high.
[0152] plt.plot(df_n_class_counts['Needs Classification'], df_n_class_counts['Number of Cases']): This line plots the Needs Classification column of the df_n_class_counts data frame on the x-axis and the Number of Cases column on the y-axis. This will display the relationship between Needs Classification and Number of Cases in a line chart.
[0153] plt.title('Number of items by need category'): Here we set the title for the graph. The title will be "Number of items by need category".
[0154] plt.xlabel('Needs Classification') and plt.ylabel('Number of Items'): These lines set labels for the x-axis and y-axis, respectively. The x-axis label is "Needs Classification" and the y-axis label is "Number of Items".
[0155] plt.show(): Finally, this line displays the graph created by matplotlib. This will display the graph on the screen based on the settings above.
[0156] The control unit 104 displays a graph on a display device (not shown), such as a liquid crystal display, connected via the external I / F 106 (FIG. 8).
[0157] The visualization is not limited to this and can also be a bar graph. Various forms of visualization are possible using matplotlib.
[0158] In the above embodiment, processing using Python was described, but this is not limited to this. Similar processing can also be performed by combining a spreadsheet such as Excel with ChatGPT or an API in part or in whole.
[0159] Furthermore, classification categories are not limited to problems and solutions or needs, but may be classified into any natural language categories such as quality, effect, use, and benefit depending on the purpose of the analysis. Furthermore, the text and character strings to be classified are not limited to patent data, and can be any natural language strings such as those in papers or questionnaires.
[0160] Although the embodiment has been described above, this embodiment is presented as an example and is not intended to limit the scope of the invention. This novel embodiment can be embodied in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. This embodiment and its modifications are included within the scope and spirit of the invention, and are also included in the inventions and their equivalents as set forth in the claims. [Explanation of symbols]
[0161] 101 CPU, 102 ROM, 103 RAM, 104 control unit, 105 HDD, 106 external I / F, 107 input unit, 108 system bus
Claims
1. A computer, A process of extracting a problem string and a solution string from each of the abstracts of the plurality of patent data; A classification processing program that executes the above.
2. A process of inputting the task string and task summary instruction information for generating a task summary string from the task string into a large-scale language model, and obtaining the task summary string as an output from the large-scale language model; a process of inputting the solution string and solution-summarization instruction information for generating a solution-summarization string from the solution string into the large-scale language model, and obtaining the solution-summarization string as an output from the large-scale language model; 2. The classification processing program according to claim 1, further comprising:
3. A process of inputting the plurality of task character strings and task classification generation instruction information including instructions for generating a plurality of task classifications in natural language from the plurality of task character strings into the large-scale language model, and obtaining the plurality of task classifications as outputs from the large-scale language model; a process of inputting the plurality of solution means character strings and solution means classification generation instruction information including an instruction to generate a plurality of solution means classifications in natural language from the plurality of solution means character strings into the large-scale language model, and obtaining the plurality of solution means classifications as outputs from the large-scale language model; 2. The classification processing program according to claim 1, further comprising:
4. A process of inputting the plurality of task summary character strings and task classification generation instruction information including instructions for generating a plurality of task classifications in natural language from the plurality of task summary character strings into the large-scale language model, and obtaining the plurality of task classifications as output from the large-scale language model; a process of inputting the plurality of solution means summary character strings and solution means classification generation instruction information including an instruction to generate a plurality of solution means classifications in natural language from the plurality of solution means summary character strings into the large-scale language model, and obtaining the plurality of solution means classifications as outputs from the large-scale language model; 3. The classification processing program according to claim 2, further comprising:
5. A computer, A process of inputting abstract strings of multiple patent data and problem classification generation instruction information including instructions for generating multiple problem classifications in natural language from the multiple abstract strings into a large-scale language model, and obtaining the multiple problem classifications as outputs from the large-scale language model; a process of inputting the plurality of abstract character strings and solution means classification generation instruction information including an instruction to generate a plurality of solution means classifications in natural language from the plurality of abstract character strings into the large-scale language model, and obtaining the plurality of solution means classifications as outputs from the large-scale language model; A classification processing program that executes the above.
6. A computer comprising: A process of extracting a problem string and a solution string from each of the abstracts of the plurality of patent data; A classification processing method that performs
Citation Information
Patent Citations
Patent map generation program and method
JP6586614B1